Thursday, August 9, 2012

Enum to List in C#


To Convert or cast Enum type to List type
List<type> objList = Enum.GetValues(typeof(SomeEnum)).Cast<SomeEnum>().ToList()

No comments:

Post a Comment