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 C2866

'variable' : const static data members of managed class must be initialized at their declarations"

It is illegal to declare an uninitialized, const static data member in a managed class or struct.

For example, the following sample generates C2866:

#using <mscorlib.dll>

__gc class CMyClass {
   public:
   const static double d; // C2866, initialize d to resolve
};

void main() {
}