'class' : invalid assembly access specifier - only 'public' or 'private' are allowed
When applied to a managed class or struct, the public and private keywords indicate whether the class will be exposed via assembly metadata. public or private can only be applied to a class in a program compiled with /com+.
The following keywords, when used with /com+, indicate that a class is managed:
The following sample generates C3380:
#using <mscorlib.dll> protected __gc class A { // C3380. Remove protected keyword. public: static int i = 9; }; void main() { A *myA = new A; Console::WriteLine(myA->i); }