ReSharper 2026.1 Help

Code inspection: Parameter is only used for precondition check (private accessibility)

This inspection reports a parameter when it is only used for validation or guard clauses and never used afterwards. That often means the value should be stored in a field or property, or the parameter should be removed.

Example

class Customer { public Customer(object value) { if (value == null) throw new Exception(); } }
class Customer { private readonly object myValue; public Customer(object value) { if (value == null) throw new Exception(); myValue = value; } }

Quick-fix

Either use the parameter value later in the method (e.g., store it in a field) or remove the parameter if the check is unnecessary.

13 April 2026