How do you pass multiple enum values in C#?

后端 未结 10 1900
灰色年华
灰色年华 2020-11-29 16:50

Sometimes when reading others\' C# code I see a method that will accept multiple enum values in a single parameter. I always thought it was kind of neat, but never looked in

10条回答
  •  野性不改
    2020-11-29 17:07

    With the help of the posted answers and these:

    1. FlagsAttribute Class (Look at the comparison of using and not using the [Flags] attribute)
    2. Enum Flags Attribute

    I feel like I understand it pretty well.

    Thanks.

提交回复
热议问题