Code Syntax Style: Multiple Attributes

Last modified: 27 February 2024

Multiple attributes in C# can be written in different ways: you can join several attributes in the same square brackets section or use several sections for different attributes. ReSharper allows you to specify the style for multiple attributes and enforce this style in the desired scope.

ReSharper also provides multiple formatting rules for attributes. To see and configure these rules, open ReSharper options (ReSharper | Options), type attribute in the search field, and check matched items on pages under Code Editing | C# | Formatting Style.

ReSharper helps you apply attributes style in the existing code and takes your preferences into account when it produces new code with code completion and code generation features, applies code templates and performs refactorings.

This feature is supported in the following languages and technologies: