Code Inspection: Convert property to auto-property
set accessors of a property do nothing but return or set value to a backing field, JetBrains Rider suggests to convert this property into an auto-implemented property (also known as auto-property), remove the backing field and replace all its usages with the newly created auto-property.
Here is an example of a quick-fix suggested by this inspection:
|Suboptimal code||After the quick-fix|
| || |
Note that this quick-fix invokes the Convert Property to Auto-Property refactoring, which will replace all usages of the backing field solution-wide. In some cases, e.g., if the property name is used in another context, you may need to resolve conflicts that arise.