如果我使用/clr:oldSyntax,则以下内容应该有效:
public __value enum IceCreamFlavors
{
Vanilla,
Chocolate,
Sardine,
};
非旧语法中的等效项是什么?在.NET 2.0的Managed C++中如何声明“managed”枚举?
Edit: when I follow JaredPar s advice, then if I try to pass an IceCreamFlavor to a function with the signature:
OrderFlavor(IceCreamFlavors flav)
通过跑步
OrderFlavor(IceCreamFlavors::Sardine)
我收到了错误提示:
IceCreamFlavors Sardine : member function redeclaration not allowed