In The Hand LtdIn The Hand
GetNames Method (enumType)
NamespacesInTheHandEnumHelperGetNames(Type)
.NET Components for Mobility
Retrieves an array of the names of the constants in a specified enumeration.
Declaration Syntax
C#Visual Basic
public static string[] GetNames(
	Type enumType
)
Public Shared Function GetNames ( _
	enumType As Type _
) As String()
Parameters
enumType (Type)
An enumeration type.
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.
Remarks
Platforms Supported
Windows Mobile
Windows Mobile Version 5.0 and later
Windows Phone
Windows Phone 7
Windows Embedded Compact
Windows CE .NET 4.1 and later
Examples
The follow example shows how to enumerate the members of the DayOfWeek enumeration by adding them to a ComboBox:-
CopyVB.NET
Dim thisDOW As New DayOfWeek
For Each thisDOW In InTheHand.EnumHelper.GetValues(Type.GetType("System.DayOfWeek"))
    ComboBox1.Items.Add(thisDOW)
Next
CopyC#
foreach(DayOfWeek thisdow in InTheHand.EnumHelper.GetValues(typeof(DayOfWeek)))
{
    comboBox1.Items.Add(thisdow);
}
Exceptions
ExceptionCondition
ArgumentExceptionenumType parameter is not an System.Enum
See Also

Assembly: InTheHand (Module: InTheHand) Version: 7.0.0.0