Code inspection: Redundant explicit positional property declaration
This inspection reports an explicitly declared record property that is already generated from a primary constructor parameter and does not add a distinct implementation. In that case, the explicit property only duplicates what the record already provides.
Example
record Person(string Name)
{
public string Name { get; init; } = Name;
}
record Person(string Name);
Quick-fix
The quick-fix removes the explicit property declaration. If the explicit property contains attributes, the quick-fix preserves them by moving them to the generated positional property where possible.
13 April 2026