GenericEnumConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Converts an Enum type to a String value.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public override object ConvertTo(
	ITypeDescriptorContext ctx,
	CultureInfo ci,
	object value,
	Type type
)

Parameters

ctx
Type: System.ComponentModel.ITypeDescriptorContext

The ITypeDescriptorContext object used for type conversions.

ci
Type: System.Globalization.CultureInfo

The CultureInfo object used during conversion.

value
Type: System.Object

The value to convert to.

type
Type: System.Type

The type to convert to.

Return Value

Type: System.Object

The String that represents the value parameter.

The system uses the ConvertTo method when it writes to a configuration file to convert a Enum type to a String value.

.NET Framework
Available since 2.0
Return to top
Show: