This documentation is archived and is not being maintained.

PropertyConverter::EnumToString Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Converts the value of the specified enumeration type to its equivalent string representation.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public:
static String^ EnumToString(
	Type^ enumType, 
	Object^ enumValue
)

Parameters

enumType
Type: System::Type
A System::Type that represents the enumeration type of enumValue.
enumValue
Type: System::Object
The value to convert.

Return Value

Type: System::String
The string representation of enumValue.

ExceptionCondition
ArgumentNullException

The enumType or enumValue parameter is nullptr.

ArgumentException

The enumType parameter is not an System::Enum type.

- or -

The enumValue parameter contains a value from an enumeration that differs in type from enumType.

- or -

The type of enumValue is not an underlying type of enumType.

The EnumToString method is used to convert an enumeration value to its equivalent string representation.

NoteNote

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code. To convert an enumeration value to its equivalent string representation, use the Enum::Format method.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: