net90_PropertyGridHelpers.Converters_EnumTextConverter_ConvertTo - dparvin/PropertyGridHelpers GitHub Wiki

EnumTextConverter.ConvertTo method

Converts the specified enum value to a String or Int32 based on the requested destination type.

public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, 
    Type destinationType)
parameter description
context An optional format context.
culture Culture information for the conversion.
value The value to convert, expected to be an enum of the specified type.
destinationType The target type for conversion (string or int).

Return Value

The converted value, or null if the input is null.

Exceptions

exception condition
ArgumentException Thrown if value is not of the expected enum type, or if the destination type is unsupported.

See Also

⚠️ **GitHub.com Fallback** ⚠️