JsonNumberEnumConverter<TEnum> Class

Definition

Converter to convert enums to and from numeric values.

generic <typename TEnum>
 where TEnum : value classpublic ref class JsonNumberEnumConverter sealed : System::Text::Json::Serialization::JsonConverterFactory
public sealed class JsonNumberEnumConverter<TEnum> : System.Text.Json.Serialization.JsonConverterFactory where TEnum : struct
type JsonNumberEnumConverter<'Enum (requires 'Enum : struct)> = class
    inherit JsonConverterFactory
Public NotInheritable Class JsonNumberEnumConverter(Of TEnum)
Inherits JsonConverterFactory

Type Parameters

TEnum

The enum type that this converter targets.

Inheritance
JsonNumberEnumConverter<TEnum>

Remarks

This is the default converter for enums and can be used to override UseStringEnumConverter on individual types or properties.

Constructors

JsonNumberEnumConverter<TEnum>()

Initializes a new instance of JsonNumberEnumConverter<TEnum>.

Properties

Type

Gets the type being converted by the current converter instance.

(Inherited from JsonConverterFactory)

Methods

CanConvert(Type)

When overridden in a derived class, determines whether the converter instance can convert the specified object type.

CreateConverter(Type, JsonSerializerOptions)

Creates a converter for a specified type.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to