Possible Duplicate:
Why doesn't .net/C# eliminate tail recursion?
Does C# do tail recusion?
I can't find any documentation telling me if it does or not.
Possible Duplicate:
Why doesn't .net/C# eliminate tail recursion?
Does C# do tail recusion?
I can't find any documentation telling me if it does or not.
C# does not innately support tail recursion in the language but here is an interesting article on a similar technique call trampolining that may help you in your situation
Unfortunately, it does not, at least not yet.
I'm not sure if the standard itself specifies anything about (dis)allowing tail recursion. Regardless, since .Net supports tail recursion, so it would be nice for this to make its way into C#.
If you really need tail recursion in a .Net language, consider F# as an alternative.