The requested page is not available for the requested platform. You are viewing the content for Default platform.

Smart Constructor

Smart Constructor generates constructors that initialize properties contained in the current class. An XML documentation stub is generated as well.

To execute the Smart Constructor, simply type "cc" and press Space. After this, CodeRush Classic will suggest the list of members to be initialized in the constructor. Check the desired members and press ENTER. The checkbox at the top of the member list enables you to select/deselect all list members in a single click.

SmartConstructor

Smart Constructor provides some additional functions, disabled by default. They are:

  • Generate public fields initializers of the base class.
  • Generate read-only properties for private fields.

You can customize Smart Constructor settings via the Smart Constructor options page.