asp.net.ph

Enum.GetNames Method

System Namespace   Enum Class


Retrieves an array of the names of the constants in a specified enumeration.

[ VB ]
<Serializable>
Public Shared Function GetNames ( _
   ByVal enumType As Type _
) As String ( )

[ C# ]
[Serializable]
public static string [ ] GetNames (
   Type enumType
);

[ C++ ]
[Serializable]
public: static String* GetNames (
   Type* enumType
) __gc [ ];

[JScript ]
public Serializable
static function GetNames (
   enumType : Type
) : String [ ];

Parameters

enumType
An enumeration.

Return Value

A string array of the names of the constants in enumType. The elements of the array are sorted by the values of the enumerated constants.

Exceptions


Exception Type Condition
ArgumentNullException enumType or value is a null reference ( Nothing in Visual Basic ).
ArgumentException enumType parameter is not an Enum.

See Also

Enum Members Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note