For your code snippet, this is due to recursion method call:
public string Name
{
get{ return Name; }
}
You are calling the Name
method/property recursively. The stack fills up (with the parent Name
method) until it overflows and a StackOverflowException
is thrown.