-
Now before you write off this post as being ‘just another silly request’ hear me out. Right now in C# we can do the following switch( someObject ) { case Option1: case Option2: case Option3: // do something break; case Option4: // do something break: } Allowing fall through for a switch statement is...
-
In the past I have written about the Fail Fast principle. This is a principle I try to live my development life by. I would rather explicitly check for possible failure points then have a runtime error crop up. In the past when writing these failure check we have had to resort to a...
-
This post is another in the recent string of How-to's. But it is just so hard to resist. .Net 3.5 has so many cool features, it is just fun to explore them all. Ok, so here is the issue we are going to solve today. We have a list of entities and we need to sort them. In this post I will show you...
-
Today I was refactoring some sql procs along with the corresponding .net code that called the procs. My primary focus was to implement some new business rules (ways to get totals) in the proc. In doing so, I completely re-wrote the proc. In the end the return values (column names) were the...
-
Over the years I have come to the conclusion when working with switch statements that switches on enum values, a DEFAULT block MUST be required. Not only should it be required, I think it should throw a developer exception. *** NOTE *** My stance on this is ONLY in scenarios where the switch statement...