Object reference not set to an instance of an object

Ruslan's ASP .NET weblog

Browse by Tags

All Tags » Enum » .NET (RSS)
string to enum
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