共用方式為


編譯器錯誤 C3277

無法在Managed 'type' 內定義 Unmanaged 列舉 'enum'

列舉在Managed類型內定義不正確。

下列範例會產生 C3277:

// C3277a.cpp
// compile with: /clr
ref class A
{
   enum E {e1,e2};   // C3277
   // try the following line instead
   // enum class E {e1,e2};
};

int main()
{
}