Welcome to MSDN Blogs Sign in | Join | Help

December 2005 - Posts

One of the things you lose when doing class-based enums is the support of the System.Enum class and its static methods for all enum types. Take a look at the documentation on MSDN —the only methods that really remain applicable are GetValues, which Read More...
So class-based enumerated types allow you to define dynamic behaviors, where the consumer of the enum doesn't have to know specifically which instance of the enum he has; he need only invoke the appropriate method, and the type of the instance will determine Read More...
I said I’d blog about how exactly I use enums, but there are a lot of interesting issues here, so I think I’ll develop my approach over the course of a few posts. Here’s my simplest form of class-based enum: public class EnumType { public static readonly Read More...
I had an interesting discussion earlier regarding enums and how they work in .NET, and since I haven't I blogged in a while, I thought I'd post some thoughts. Conceptually, an enumerated type is a type that has a set of values that can be (surprise surprise) Read More...
 
Page view tracker