Skip to main content
A newer version of this page is available. .

Member Sections

  • 2 minutes to read

Templates can place generated members in dedicated target sections for those members.

For instance, you can expand the "pb" template to create a Boolean property. For this, type the template name and press Space.

PlaceMembers

NOTE

The Member Sections feature is enabled by default. To disable this feature, uncheck the Use Member Sections checkbox in the Editor | All Languages | Organize Members options page.

You can also customize adding a comment in the start of a member section or wrapping a section into a region. See sections below for details.

Customize Adding a Comment in the Start of a Section

Follow the steps below.

  • Select CodeRush\Options... from the Visual Studio menu.
  • Select the Editor | All Languages | Organize Members page in the tree view on the left.
  • Select the Fields rule.
  • Click the Comment button.

CommentButton

  • Type the required comment in the "Comment text" field, for example, "Fields...".

CommentTextField

  • Click Apply to save changes or click OK to save changes and close the CodeRush configuration menu.
    If you wish to cancel changes, click Cancel.
  • Switch to code and expand a template. For instance, expand "pb" and "ps" templates to create Boolean and String properties, accordingly.

StartWithComment

Customize Wrapping a Section into a Region

Follow the steps below to customize this behavior.

  • Select the Editor | All Languages | Organize Members options page.
  • Select the Fields rule.
  • Click the Region button.

ClickRegionButton

  • Type the region text in the "Region name" field, for example, "Fields...".

RegionTextField

  • Click Apply to save changes or click OK to save changes and close the Coderush configuration menu.
    If you wish to cancel changes, click Cancel.

  • Switch to code and expand a template. For instance, expand "pb" and "ps" templates to create Boolean and String properties, accordingly.

WrapIntoRegion

See Also