Using Recursion in C#

前端 未结 10 677
我寻月下人不归
我寻月下人不归 2020-12-14 20:19

Are there any general rules when using recursion on how to avoid stackoverflows?

10条回答
  •  生来不讨喜
    2020-12-14 20:54

    I just thought of tail-recursion, but it turned out, that C# does not support it. However the .Net-Framework seems to support it:

    http://blogs.msdn.com/abhinaba/archive/2007/07/27/tail-recursion-on-net.aspx

提交回复
热议问题