Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C3280
Collapse the table of content
Expand the table of content

Compiler Error C3280

Error Message

'class' : a member-function of a managed type cannot be compiled as an unmanaged function

Managed class member functions cannot be compiled as unmanaged functions.

The following sample generates C3280:

// C3280_2.cpp
// compile with: /clr
ref struct A {
   void func();
};

#pragma managed(push,off)

void A::func()   // C3280
{
}

#pragma managed(pop)

The following sample generates C3280:

// C3280.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>

__gc struct A {
   void func();
};

#pragma managed(push,off)

void A::func()   // C3280
{
}

#pragma managed(pop)

Community Additions

ADD
Show:
© 2015 Microsoft