ReSharper 2016.2 Help

Code Inspection: Possible cyclic constructor call

Given the following (rather synthetic) code snippet

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

calling any of the constructors will cause an eventual stack overflow as constructors call each other perpetually.

See Also

Last modified: 15 December 2016