实现效果如FlagsAttribute 那样,  可以有多重属性, 赋值方法如 "FlagsAttribute.Hidden |  FlagsAttribute.ReadOnly "

首先定一个enum类型
例:
1用"|" 表示多种状态的按位枚举enum Test 
2}
每一个元素的值一定要是2 的幂 如 2, 4 ,8, 16 等

应用:
用"|" 表示多种状态的按位枚举[STAThread]
用"|" 表示多种状态的按位枚举        
static void Main(string[] args)
        }

输出结果 :
is T1
isn't T2

相关文章: