StackOverflowException
I was developing today and got a StackOverflowException, and I quickly realized what it was. One of the ways you get this is if you do "too much" in the constructor; that is, you can do limited things in the constructor. If you get this from something you are doing in the constructor, that means you can't do it.
I also get this if you get a circular reference, meaning that you have a property like this:
public string Text
{
get { return this.Text; }
}
This is a recursive, infinite loop when accessed, when you really meant to do this:
public string Text
{
get { return _text; }
}
So watch out for those things, and know that this exception may mean you have an infinite loop in your code.