Back to Devexpress

How to: Create a Rule

coderushforroslyn-401398-getting-started-examples-organize-members-how-to-create-a-rule.md

latest1.0 KB
Original Source

How to: Create a Rule

  • Apr 13, 2022
  • 2 minutes to read

Follow the steps below to create a new rule for private enumerators:

  1. Open the Editor | All Languages | Organize Members options page.

  2. Click Add Rule to create a new rule.

  3. Change the suggested rule name to “Private enumerators” and press Enter to save the change.

  4. Change the “Private enumerators” rule’s position, as shown in the screencast below, so that private enumerators follow events in a type. To change the rule’s position, drag the “Private enumerators” rule in the rule list and drop it when you reach the desired position.

  5. Configure grouping:

  6. Configure sorting (optional) or leave it as is.

  7. Click Apply and OK to save the changes and close the Organize Members options page.

  8. In the following code, place the caret anywhere in the class body.

  9. Press Ctrl+. or Ctrl+~ to invoke the Code Actions Menu. Select Organize Members and press Enter.