Retrieves the name of the constant in the specified enumeration that has the specified value.
Assembly: mscorlib (in mscorlib.dll)
[<ComVisibleAttribute(true)>] static member GetName : enumType:Type * value:Object -> string
- Type: System.Type
An enumeration type.
- Type: System.Object
The value of a particular enumerated constant in terms of its underlying type.
Return ValueType: System.String
A string containing the name of the enumerated constant in enumType whose value is value; or a null reference (Nothing in Visual Basic) if no such constant is found.
If multiple enumeration members have the same underlying value, the method guarantees that it will return the name of one of those enumeration members. However, it does not guarantee that it will always return the name of the same enumeration member. As a result, when multiple enumeration members have the same value, your application code should never depend on the method returning a particular member's name.
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.