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 C3137

'property' : a property cannot be initialized

A property cannot be initialized in a constructor’s initialization list.

For example, the following code will generate C3137:

// compile with cl /c
class CMyClass {
public:
  [property] int prop;
  CMyClass() : prop(1) {};   // this line causes C3137
};

You can eliminate the error by rewriting the constructor to be

CMyClass() {
   prop = 1;
}