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 C3610

'valuetype': value type must be 'boxed' before method 'method' can be called

By default, a value type is not on the managed heap. Before you can call methods from NGWS runtime classes, such as Object, you need to move the value type to the managed heap.

#using <mscorlib.dll>

__value class A {
};

void main() {
   A a;
   a.GetType(); // C3610

   /* to resolve the error use the lines below
   Object *ovar = dynamic_cast<Object*>(a);
   ovar->GetType();
   */
}