ReSharper 2026.1 Help

Code inspection: Replace auto-property with computed property

This inspection reports an auto-property with a trivial constant initializer that does not need per-instance storage. The tested quick-fix converts the property into a computed property, which avoids storing the same value in every instance.

Example

class C { public int Property { get; } = 42; }
class C { public int Property => 42; }

Quick-fix

Replace the auto-property with a computed property.

30 March 2026