static
field is hidden due to method's parameter CS-W1085static
fields are those fields that can be accessed without a class instance. If a method has a parameter whose identifier is the same as that of a static field, then the respective static
field becomes hidden and is no longer accessible within the method. It is therefore recommended that you rename the parameter.
static int i = 0;
public void M(int i) // Hides field `i`
{
// ...
}
static int i = 0;
public void M(int j) // Renamed to `j`
{
// ...
}