ReSharper 2019.3 Help

Code Inspection: Redundant comma in enum declaration

Currently, ReSharper suggests removing optional trailing commas for the sake of conciseness, and this behavior is not configurable. We are going to introduce a configurable code syntax style for trailing commas in the coming versions — here is the tracking issue.

If you prefer having trailing commas in enum declarations, just disable this inspection: press Alt+Enter and choose Inspection: "Redundant comma in enum declaration" | Configure inspection severity | Do not show.

enum MyColor { Red, Green, // trailing comma after the last value is optional Blue, }
Last modified: 13 February 2020