Code inspection: Unused positional parameter
This inspection reports a positional parameter that is never used to initialize the property with the same name. It usually means the property declaration forgot to use the constructor parameter.
Example
record Person(string Name, int Age)
{
public string Name { get; init; }
}
record Person(string Name, int Age)
{
public string Name { get; init; } = Name;
}
Quick-fix
The quick-fix initializes the property with the constructor parameter or remove the unused parameter.
13 April 2026