ReSharper 2026.1 Help

Code inspection: Not accessed primary constructor parameter

This inspection reports a primary constructor parameter that is declared but never accessed. In practice, this usually means the parameter should either initialize state or be removed.

Example

class Person(string name, int age) { public string Name { get; } }
class Person(string name, int age) { public string Name { get; } = name; }

Quick-fix

The quick-fix initializes a property or field with the constructor parameter, or remove the unused parameter.

13 April 2026