Code providers for converting unimplemented properties
August 30th, 2012
CodeRush has two code providers that allow you to convert unimplemented properties into a property with backing store field or into an auto-implemented property quickly:
- Convert to Property with Backing Store
- Convert to Auto-implemented Property
The code providers are useful if you have implemented an interface, for instance:
and you are going to provide implementation for properties of the interface:
Choose the Convert to Property with Backing Store code provider if you’d like to create a backing store field and remove it from the property:
Choose the Convert to Auto-implemented Property code provider if you do not need a backing store field and would like to have an auto-implemented property instead. This is the resulting code after the code provider is applied on three other properties: