DustinCampbell/CSharpEssentials

Consider using a getter-only auto property is reported if static property is set from class constructor

holatom opened this issue · 0 comments

"Consider using a getter-only auto property" fix is incorrectly reported if static property is set from class constructor (not from static constructor).

public class MyClass
{
    public static bool StaticProperty { get; private set; } //<- "Consider using a getter-only auto property" is reported here.

    public MyClass()
    {
        StaticProperty = true;
    }
}