JsonNumberEnumConverter<TEnum> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- TEnum
The enum type that this converter targets.
- Inheritance
This is the default converter for enums and can be used to override UseStringEnumConverter on individual types or properties.
Json |
Initializes a new instance of JsonNumberEnumConverter<TEnum>. |
Type |
Gets the type being converted by the current converter instance. (Inherited from JsonConverterFactory) |
Can |
When overridden in a derived class, determines whether the converter instance can convert the specified object type. |
Create |
Creates a converter for a specified type. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions |
---|---|
.NET | 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: