December, 2005

  • Neal's Blog

    Enumerated Types: Enumerating the Values

    • 1 Comments
    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,...
  • Neal's Blog

    Enumerated Types: Dynamic Differentiation

    • 0 Comments
    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...
  • Neal's Blog

    Enumerated Types: Using Classes

    • 1 Comments
    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...
  • Neal's Blog

    Enumerated Types

    • 4 Comments
    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...
Page 1 of 1 (4 items)