Recent Posts
Calendar
October 2013
S M T W T F S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Archive for October 2nd, 2013

CSharp Enum

tp_vol4_002 It is often tempting when working with your code to test against static values in your system.  For example:

if (i == 1)
{
    // do something
}
else if (i == 2)
{
    // do something
}

Or, if you are a bit more clever, you use a switch statement instead.  But neither of these methods tell you what 1 and 2 actually represent. Read the rest of this entry »