General Discussion

May 29, 2008 at 3:38 PM
Do you find the SpecializedEnum code useful? Do you have another way of accomplishing enum-like behavior with arbitray objects? Are there ways to make this code more efficient? Feel free to comment here.
Feb 3, 2009 at 4:21 PM
Just wanted to say thanks for posting - very handy-

you can also use const's instead of static-readonly's and they work great in switch/case statements as well-

Mar 29, 2009 at 9:44 AM
GR8 .... i will use this

but please make sure that you put some clear example here...

Sep 7, 2009 at 7:08 AM

Thanks, I'm glad it helped you. The reason the examples use public static readonly instead of public const is that only ValueTypes can be used as constants. So, for example, Guid can only be done with public static readonly to get a constant-like behavior.

Sep 7, 2009 at 7:12 AM

I suppose I should generate a CHM file from the doc comments in the source file, but I've been pretty swamped and haven't had time to do it so far. Also, most of the functionality operates very similarly to a standard enum so you can use it very much like you would a normal enum.