'class': custom attribute class does not have any public constructors
A custom attribute class must have a public constructor.
The following sample generates C3738:
#using <mscorlib.dll> using namespace System; [attribute(All)] __gc class A { private: // The following line resolves the error. // public: A() { } }; // C3738 void main() { }