Geeks With Blogs


Let's Meet!

My Office Hours
profile for borrillis on Stack Exchange, a network of free, community-driven Q&A sites
Mathoms There and back again... a blogging story. June 2009 Entries
Enumerations, structs and Extension Methods
I happened to come across a situation where I needed an Enumeration but the enumeration needed to provide more than just a int value. In my situation, I not only had a integer value that was tied to the database, but I also needed to display an image for each individual value. I wanted to maintain a .Net-ish look and feel to the code, so I started by writing a few tests based on an existing enumeration. First the enum : public enum StatusIndicator : int { Ready = 1, Paused = 2, Offline = 3 } And ......

Posted On Tuesday, June 16, 2009 12:13 PM

Copyright © Michael Cummings | Powered by: | Join free