'attribute': empty attribute argument list is not allowed
Either when defining the custom attribute class or when applying the attribute, an empty argument list can never be passed to the attribute.
#using <mscorlib.dll> using namespace System; [attribute()] // C3406 // try the following line instead // [attribute(Method)] public __gc class MyAttribute : public Attribute { public: MyAttribute() : Attribute() { } }; public __gc class Data { public: [MyAttribute()] // C3406 // try the following line instead // [MyAttribute] void Exit() { }; }; void main() { }