Consume-first Development
When codeing, it is often useful to use an identifier before it has been declared. This is a common situation for Test Driven Development. CodeRush by DevExpress provides a powerful tool, which enables you to quickly declare types, members, variables on basis of their references.
Automatic Declarations
The automatic declaration features of CodeRush are a quick way to generate the code you need. It starts with a call or a reference to something that
doesn't exist yet. Just move the caret to the reference that needs to be declared, press the CodeRush key (Ctrl+` by default) and choose the appropriate
code provider from the CodeRush context menu. CodeRush will do the rest, declaring the missing member, type, enum, variable etc. You can also access the
declaration features via the Code item of Visual Studio context menu. If you are declaring a class, enum, struct, or interface, CodeRush deeply scans surrounding source code for hints about the type you want to declare and intelligently declares members for all found references. Watch the video below for an example.   CodeRush supports the following declarations:
Types
 | Declare Attribute |  | Declare Class |  | Declare Class With Properties |
 | Declare Delegate |  | Declare Enum |  | Declare Interface |
 | Declare Struct |
Members
 | Declare Constructor |  | Declare Event |  | Declare Event Handler |
 | Declare Getter |  | Declare Initialized Properties |  | Declare Initialized Property |
 | Declare Method |  | Declare Method (abstract) |  | Declare Properties |
 | Declare Property |  | Declare Property (auto-implemented) |  | Declare Property (with backing store) |
 | Declare Setter |
Variables
 | Declare Enum Element |  | Declare Field |  | Declare Field (read-only) |
 | Declare Initialized Field |  | Declare Initialized Fields |  | Declare Local |
 | Declare Local (implicit) |
MVC Elements
 | Declare MVC Action |  | Declare MVC Controller |  | Declare MVC View |
The automatic declarations can be accessed via shortcuts or from the appropriate code providers.
|