Iteration depth

  • Thread starter Thread starter Francois Vanderseypen
  • Start date Start date
F

Francois Vanderseypen

Was wondering what the iteration depth limit is in C#? This is in the
context of a recursive (LOGO) parser, wether I should watch the level
or not.

Thx!
 
You'll get a stack overflow exception. Just catch that rather than coding to
watch it.
 
Francois Vanderseypen said:
Was wondering what the iteration depth limit is in C#? This is in the
context of a recursive (LOGO) parser, wether I should watch the level
or not.

That depends on how much stack you have in each level of recursion
(which is what I think you mean). It's best not to design programs
where the recursion level is dependent on something you have no control
over and which could be very large, but it's probably okay for a
parser.
 
Back
Top