NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2363

'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() {
}