共用方式為


JsonMetadataServices.GetNullableConverter<T> 方法

定義

建立 JsonConverter<T> 可轉換值的 T?? 實例。

public:
generic <typename T>
 where T : value class static System::Text::Json::Serialization::JsonConverter<Nullable<T>> ^ GetNullableConverter(System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ underlyingTypeInfo);
public static System.Text.Json.Serialization.JsonConverter<T?> GetNullableConverter<T> (System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> underlyingTypeInfo) where T : struct;
static member GetNullableConverter : System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T (requires 'T : struct)> -> System.Text.Json.Serialization.JsonConverter<Nullable<'T>> (requires 'T : struct)
Public Shared Function GetNullableConverter(Of T As Structure) (underlyingTypeInfo As JsonTypeInfo(Of T)) As JsonConverter(Of Nullable(Of T))

類型參數

T

基礎可為 null 類型的泛型定義。

參數

underlyingTypeInfo
JsonTypeInfo<T>

基礎可為 null 型別的序列化中繼資料。

傳回

JsonConverter<Nullable<T>>

適用於