G
Guest
Hello,
Iam quite new to programming and dont know enough about the stack.
My problem is if I call a recurcive function like in the code
TestCalc(100000),
I get at some integer argument size a stack overflow exception.
The recursion is not endless. But at 1000000 the exception is thrown.
What is limitation of the stack or how can I figure it out.
Are there restrictions about function calls?
Thanks for your answer..
Code Part:
private void TestCalc(int counter)
{
if (counter <= 0)
{
return;
}
TestCalc(counter - 1);
}
void BtnTestStart_Click(object sender, EventArgs e)
{
TestCalc(100000);
}
Iam quite new to programming and dont know enough about the stack.
My problem is if I call a recurcive function like in the code
TestCalc(100000),
I get at some integer argument size a stack overflow exception.
The recursion is not endless. But at 1000000 the exception is thrown.
What is limitation of the stack or how can I figure it out.
Are there restrictions about function calls?
Thanks for your answer..
Code Part:
private void TestCalc(int counter)
{
if (counter <= 0)
{
return;
}
TestCalc(counter - 1);
}
void BtnTestStart_Click(object sender, EventArgs e)
{
TestCalc(100000);
}