Jeff Garoutte

c# .net and anything else that happens across my desk

Using an Object for an Id

It's not that uncommon to use an ID for a data object.  However, sometimes more information is needed to uniquely identify an object than a number.  In these cases is useful to use another object.  It can contain an integer, guid, date created, created by, or even the date and time and object was modified. A good example of this would be a content management system.  A given piece of content could have a content object ID, which would contain an ID, the day and time of the modification,... [More]
Posted: Jun 19 2009, 18:00 by jeff | Comments (0) RSS comment feed |
Filed under: General
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Enum - the good, the bad, the ugly and how to kill them

The blessed enumeration I remember when I first learned about enumerations; they opened a whole world of easy coding and I think they have their place….CommandType anyone?  But really, let's kill them. How often have you seen this… enum StatusEnum { Active, Inactive, New, Deleted } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .cs... [More]
Posted: Jun 17 2008, 09:05 by jeff | Comments (0) RSS comment feed |
Filed under: General
Tags: ,
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us