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

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.

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.