net90_PropertyGridHelpers.Converters_EnumTextConverter_ConvertTo - dparvin/PropertyGridHelpers GitHub Wiki
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). |
The converted value, or null
if the input is null
.
exception | condition |
---|---|
ArgumentException | Thrown if value is not of the expected enum type, or if the destination type is unsupported. |
- class EnumTextConverter
- namespace PropertyGridHelpers.Converters
- assembly PropertyGridHelpers