General Discussion

Coordinator
May 29, 2008 at 2: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 3: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-

thanks- 
Mar 29, 2009 at 8:44 AM
GR8 .... i will use this


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


thanks
Coordinator
Sep 7, 2009 at 6: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.

Coordinator
Sep 7, 2009 at 6: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.