CSharp examples for System:Enum
Retrieves an array of the names of the constants in a specified enumeration.
using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from ww w. j av a 2s. c om*/ public class Main{ /// <summary> /// Retrieves an array of the names of the constants in a specified enumeration. /// </summary> /// <returns>A string array of the names of the constants in <typeparamref name="TEnum"/>.</returns> public static string[] GetNames() { return Enum.GetNames(_enumType); } }