public enum VehicleData
{
Dodge = 15001,
BMW = 15002,
Toyota = 15003
}
I want to get above values 15001, 15002, 15003 in string array as shown below:
string[] arr = { "15001", "15002", "15003" };
I tried below command but that gave me array of names instead of values.
string[] aaa = (string[]) Enum.GetNames(typeof(VehicleData));
I also tried string[] aaa = (string[]) Enum.GetValues(typeof(VehicleData));
but that didn't work too.
Any suggestions?