JetBrains Rider
 
2024.3
Get JetBrains Rider

Code Syntax Style: Trailing Commas

Last modified: 11 February 2024

When multiple items are separated by the comma (object, array, and collection initializers, as well as enums and switch expressions) , C# allows you to have the trailing comma after the last item.

JetBrains Rider helps you arrange trailing commas 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.