C# Recursion Depth - How Deep can you go
问题 Is there any control how much you can Recursively call something? From a basic test program I get a recursion depth of just over 18k which depends on the stacksize.... is there a way to set up a chunk of memory (perhaps a thread) with a massive stack to increase recursion depth? 回答1: I've increased the stack size during some documents recognition. It was really needed. So you can increase stack size for thread using following code: var stackSize = 10000000; Thread thread = new Thread(new