General.GetEnumDescriptiveNames Method
Get all enum items display names
Make sure each enum item has System.ComponentModel.DataAnnotations.DisplayAttribute.
eg [System.ComponentModel.DataAnnotations.Display(Name = "Email Contact", Description = "Email Contact from the
Contact Editor / Viewer")]
Note: old style still supported - System.ComponentModel.DescriptionAttribute. eg
[System.ComponentModel.Description("Pie Chart")]
Public Shared Function GetEnumDescriptiveNames( _
ByVal type As Type _
) As String()
This language is not supported or no code example is available.
public static string[] GetEnumDescriptiveNames(
Type type
)
This language is not supported or no code example is available.
public:
static array< String^ >^ GetEnumDescriptiveNames(
Type^ type
)
This language is not supported or no code example is available.
public static function GetEnumDescriptiveNames(
type : Type
) : String[];
This language is not supported or no code example is available.
Parameters
-
type
-
Type
<default>
Return Value
string[]
.NET Framework
Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1