ReSharper 2025.2 Help

代码检查:可能的循环构造函数调用

给出以下(相当合成的)代码片段

class Base { Base(int n) : this("") { } Base (string s) : this(0) { } }

调用任何一个构造函数都会导致最终的堆栈溢出,因为构造函数会相互调用无限循环。

最后修改日期: 2025年 9月 27日