ReSharper
 
2023.2
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Code Syntax Style: Trailing Commas

Last modified: 20 November 2023

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.

ReSharper 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.