ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Get-only auto-property is never assigned

Last modified: 06 June 2024

This inspection reports get-only auto-properties that are used in some operations or returned by a method, but are never assigned a value. This often indicates that some part of your code is not functioning as intended, or that the property is redundant and should be removed, or that the property should be initialized from a constructor .