.NET Enumeration allows comma in the last field

后端 未结 5 1513
后悔当初
后悔当初 2020-11-27 06:13

Why is this .NET enumeration allowed to have a comma in the last field?
Does this have any special meaning?

[FlagsAttribute]
public enum DependencyProper         


        
5条回答
  •  余生分开走
    2020-11-27 06:48

    Also (to Nick Craver post) its much easier to add new enumerations.

    This behaviour appropriate not uniquely to enums. Consider following:

    var list = new int[] { 1, 2, 3, };
    

提交回复
热议问题