JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

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.

JetBrains Rider also provides multiple formatting rules for attributes. You can configure these rules in Rider settings CtrlAlt0S, for example, go to the Editor | Code Style | C# page and check the preferences on the Line breaks and wrapping tab.

JetBrains Rider 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.