In c# you can achieve stack overflow in a different manner, by wrongly defining object properties.
For example :
private double hours;
public double Hours
{
get { return Hours; }
set { Hours = value; }
}
As you can see this will forever keep on returning Hours with an uppercase H , which in itself will return Hours and so and so on.
A stack overflow will often occur also because of running out of memory or when using managed languages because your language manager (CLR, JRE) will detect that your code got stuck in an infinite loop.