Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

Bind Enum data to Dropdown List By Sorting

0.00/5 (No votes)
30 Dec 2010CPOL 5.8K  
here is what I do to iterate through enumpublic static ABC(Type enumType){ foreach (Enum e in Enum.GetValues(enumType)) { int tvalue = Convert.ToInt32(e); string tname = e.ToString(); }}
here is what I do to iterate through enum


public static ABC(Type enumType)
{
  foreach (Enum e in Enum.GetValues(enumType))
  {
    int tvalue = Convert.ToInt32(e);
    string tname = e.ToString();    
  }
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)