public class EnumConverter : ArgumentConverter
Public Class EnumConverter
Inherits ArgumentConverter
Dim instance As EnumConverter
public ref class EnumConverter : public ArgumentConverter
This converter performs a case insensitive conversion, and accepts the name of an enumeration value, or its underlying value. In the latter case, the value does not need to be one of the defined values of the enumeration; use the ValidateEnumValueAttribute attribute to ensure only defined enumeration values can be used.
A comma-separated list of values is also accepted, which will be combined using a bitwise-or operation. This is accepted regardless of whether the enumeration uses the FlagsAttribute attribute.
If conversion fails, this converter will provide an error message that includes all the allowed values for the enumeration.
EnumConverter | Initializes a new instance of the EnumConverter for the specified enumeration type. |
EnumType | Gets the enumeration type that this converter converts to. |
Convert(ReadOnlySpanChar, CultureInfo, CommandLineArgument) |
Converts a string span to the enumeration type.
(Overrides ArgumentConverterConvert(ReadOnlySpanChar, CultureInfo, CommandLineArgument)) |
Convert(String, CultureInfo, CommandLineArgument) |
Converts a string to the enumeration type.
(Overrides ArgumentConverterConvert(String, CultureInfo, CommandLineArgument)) |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (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) |