The code is not necessarily shorter overall but check out these classes I created for this purpose:
http://www.vbforums.com/showthread.php?552563
In your case, the code would be:
That said, you could already be using this:csharp Code:
var model = new EnumDescriptorCollection<CaseParty.PRIORITY_TYPE>().Select(ed => ed.ToString()).ToList();
csharp Code:
var model = Enum.GetValues(typeof(CaseParty.PRIORITY_TYPE)) .Cast<CaseParty.PRIORITY_TYPE>() .Select(pt => pt.ToDescriptionString()) .ToList();




Reply With Quote