'arg': cannot evaluate argument 'custom attribute' of custom attribute
A custom attribute can only have arguments that can be evaluated at compile time.
The following sample generates C2363:
#using <mscorlib.dll> using namespace System; int func() { return 0; } [attribute(All)] __gc class A { public: A(int) { } }; [A(func())] // try the following line // [A(0)] __gc class B { // C2363 }; void main() { }