With JustCode code styles
you can quickly create code style that best fits your preferences. Within the JustCode Options
window number of options control what your code will look like.
In this How To topic you will modify the default JustCode code style to:
- insert space between method name and its opening parentheses
- insert space within parameter list parentheses
- insert space within argument list parentheses
- insert space inside parentheses of expressions
- insert space inside parentheses for control flow statements
- insert space within array brackets
- insert space around braces
- arrange brace positions based on coding style preference
- reorders code elements in the following access sequence: private, internal, protected-internal, protected, public
Select Options... from the main menu.
Navigate to Code Style | C# | Spacing.
To apply the preferences above, check the corresponding options as shown:
Select Options... from the main menu.
Navigate to Code Style | C# | Brace positions.
To apply the preferences above, check the corresponding options as shown:
To modify code elements ordering navigate to Code Style | C# | Ordering.
Select "Reorder code elements when formatting" and move up or down the access modifiers as shown below:
At this point you have created your own code style to use when formatting code. You can use it by selecting
the corresponding option from the main menu. Navigate to JustCode | Code | Format Code or press Ctrl+Alt+F.
Here is an example of a hard to read code fragment:
After applying your code style the code is modified in:
Refer to Code Style and Code Cleaning for more information.
See Also