There are CC0071 warnings for constructor parameters that are passed to base() or this() constructors. See "OK", "NOT OK" in comments for what's expected.
public class Base
{
public Base(int x) // CC0071 - OK
{
}
}
After fix applied - OK:
public class Base
{
private readonly int x;
public Base(int x)
{
this.x = x;
}
}
Let's create a derived class:
public class Derived :Base
{
public Derived(int x) : base(x) // CC0071 - NOT OK, because x is passed to base ctor
{
}
}
Another false flag for this(x):
public class Base
{
private readonly int x;
public Base(int x)
{
this.x = x;
}
public Base(int x, string s) : this(x) // // CC0071 for x - NOT OK, for s - OK
{
}
}
There are CC0071 warnings for constructor parameters that are passed to base() or this() constructors. See "OK", "NOT OK" in comments for what's expected.
After fix applied - OK:
Let's create a derived class:
Another false flag for this(x):