Home > Code Generation, Coding Helpers > Code providers for converting unimplemented properties

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:

CodeRush Convert to Property with Backing Store code sample

and you are going to provide implementation for properties of the interface:

CodeRush Convert to Property with Backing Store preview

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:

CodeRush Convert to Property with Backing Store result

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:

CodeRush Convert to Auto-implemented property result

—–
Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: 2008 and up
Updated: Aug/30/2012
ID: C180

Similar Posts: