Monthly Archives: March 2009

The StackOverflowException

Take a look at the following code: class Program { static void Main(string[] args) { try { RecurseForever(); } catch (StackOverflowException) { Console.WriteLine(“Caught Stack Overflow Exception”); } catch (Exception) { Console.WriteLine(“Caught general Exception”); } Console.ReadLine(); } static void RecurseForever() { … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Tip of the Day #9 (The Project Location Is Not Trusted)

This tip is to get a tool called ZoneStripper by James Kovaks to stop the annoying “project location not trusted” dialog box, below, appearing when you open downloaded solutions in Visual Studio. If you download zipped source code from the … Continue reading

Posted in Tip of the Day | Tagged , , | 7 Comments

I guess I’ve never needed to do this before…

I guess I’ve never created a struct in a while (at least in Visual Studio 2008 using C# 3.0) because I’ve just discovered that the Automatic Properties don’t work in structs. I’ve just created this struct: public struct CapacityUnit { … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Update

If you follow my blog on a regular basis you’ll have noticed the entries fall off over the last couple of months. That’s because I’m currently heavily involved in organising Developer Day Scotland on the 2nd May. (By the way, … Continue reading

Posted in Uncategorized | Leave a comment

Quote of the day

“Just changing your variable name rarely affects the outcome of your code. Just as naming your dog one name vs another. The dog is still the same dog.” [^]

Posted in Uncategorized | Tagged | 2 Comments

The try-catch-ignore anti-pattern (again!)

I’ve blogged about this a few times, but today I just want to highlight the frustration this causes on fellow developers. Earlier today I saw a tweet from Chris Canal that said: “Are you swallowing exceptions there?! Hold on, let … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment