April 2008 - Posts

1
Comments

string to enum by funky_rus

How do you convert a string into an enumeration? object Enum .Parse(System. Type enumType, string value, bool ignoreCase); example: enum Colour { Red, Green, Blue } Colour c = ( Colour ) Enum .Parse( typeof ( Colour ), "Red" , true ); Console .WriteLine...
More Posts