Windows应用程序中的标志属性 [英] Flag attribute in windows application
本文介绍了Windows应用程序中的标志属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
海,
我对flag属性有一些疑问.在Windows应用程序项目中,他们使用了flag属性.但是如果我创建一个新的应用程序,我尝试使用flag属性.但是它不接受flag属性.是否存在用于使用flag属性的任何命名空间?帮帮我.
在此先感谢
Sridharan.C
Hai,
I have some doubts regarding flag attribute.In windows application project they used flag attribute.But If I create a new application i tried to use flag attribute.But it is not accepting the flag attribute.Is there any namespace for using flag attribute?Plz help me.
Thanks in Advance
Sridharan.C
推荐答案
命名空间:系统
枚举的[Flags]属性使您可以立即为枚举分配多个值.
在这里查看详细信息:
C#枚举标志属性 [ ^ ]
有关如何使用它的示例:
枚举标志属性 [为什么我们需要枚举上的[Flags]属性? [ ^ ]
Namespace: System
The [Flags] attribute on an enum allows you to assign multiple values to your enum at once.
Look here for details:
C# Enum Flags Attribute[^]
Example on how it can be used:
Enum Flags Attribute[^]
Why do we need a [Flags] attribute on enums?[^]
这篇关于Windows应用程序中的标志属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文