Umbrella eases the use of the Enum.Parse method, as well as the ability to change the literal representation of an enumerated value.

For instance, with the following enumeration :

   enum Color


Note that the Description attribute is not mandatory and is used only if present. If not, the literal representation of the enumerable value is used.

The enumeration values can be converted like this :

   Color red = "R".Conversion().To<Color>();
   Color green = "Green".Conversion().To<Color>();
   var isTrue = Color.Blue.Conversion().To<string>() == "B";

Last edited Feb 24, 2009 at 1:52 AM by jlaban, version 4


Qwertie Apr 26, 2011 at 12:24 AM 
Re: the title "Convert a string to an enumerable" - an enumeration is not the same thing as an enumerable (IEnumerable).