C#

C#

Made by DeepSource

Setter does not access value CS-W1083

Bug risk
Critical

A setter simply assigns the user provided value to a field. To do this, it has to access value, an identifier that has its own meaning in the context of an accessor. However, in this case, the setter has no reference to the identifier value and is likely ignoring the value that the user is providing.

Bad Practice

set => _field = 1; // Missing access to `value`

Recommended

set => _field = value; // Correctly assigns user provided value to `_field`