Click here to Skip to main content
15,949,809 members
Articles / Programming Languages / C# 4.0

A Generic enum Parser in C#

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
30 May 2011CPOL 17.1K   5  
A possibly simpler version of this is to create an extension method for strings:public static class MyExtensions{ public static TEnum ParseEnum(this string value, bool ignoreCase = false) where TEnum : struct { TEnum tenumResult; ...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Undead Labs
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions