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

Variable boxing and == vs. Equals

Let's take a moment and think about exactly how boxed variables work when checking to see if they are equal. Here is a little Console application to do a quick comparison of how the Equals function and == operator work. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace VariableBoxEqualityTest { class Program { static void Main(string[] args) { int x = 1; int y = 1; test(x, y); ... [More]
Posted: Jun 18 2009, 10:04 by jeff | Comments (0) RSS comment feed |
Filed under: General | Research
Tags:
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Extending the ASP.Net Security model to use rights: Cassini

I get a few messages about how the rights system fires many times per request and it is a lot of SQL traffic.  Allow me to address this issue and introduce to your silent partner Cassini. Most developers, myself included, love being able to click the "play" icon (press F5 or select start debugging from the menu) and be able to debug their WebForms or MVC application on their local box.  The catch here is this- the site you are debugging is not running on/being served by IIS.  It'... [More]
Posted: Jun 18 2009, 09:49 by jeff | Comments (0) RSS comment feed |
Tags: ,
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us