Possible duplicate:.NET Enumeration allows a comma in the last field
public enum SubPackageBackupModes { Required, NotRequired //no comma } public enum SubPackageBackupModes { Required, NotRequired, //extra unnecessary comma }
Since both compile, are there differences between these ads?
I prefer the second syntax because if you add an add member to your listing, you will only have one difference in SCM.
No, no difference.
This has also been allowed in C ++, and it continues. I think this is easier with a comma, since you can comment on the last element of the enumeration, and it is easier for code generation tools.