在C#中有FlagsAttribute
:
[Flags]
public enum Options
{
None = 0,
Option1 = 1,
Option2 = 2,
Option3 = 4,
}
但看起来无论何时在IDL中声明枚举并进入类型库并稍后使用tlbimp导入它,它最终都是en enum而不是FlagsAttribute
,即使它包含具有互斥位模式的值。 / p>
是否有可能以某种方式在IDL中声明枚举,以便在互操作程序集中应用FlagsAttribute
?