c# - How to define a public static method with a collection param in C++/CX? -
how define public static method param collection (vector or map) ? (then, need c# in wp8 call method)
i wrote:
public ref class testclass sealed { public: static void test(windows::foundation::collections::ivector<int> ^ s); static void test1(platform::collections::vector<int> ^ s); }
then, both test , test1 compile errors.
error lnk2001: unresolved external symbol "public: static void __cdecl wpruntimecomponent::delegatetest::test(struct windows::foundation::collections::ivector ^)" (?test@delegatetest@wpruntimecomponent@@saxp$aau?$ivector@h@collections@foundation@windows@@@z)
there 2 problems code.
the method test doesn't have body therefore linker error
the method test1 public method of ref class means can use windows runtime types in signature whereas method has param of type platform::collections::vector, not proper windows runtime type, happens helper native type defined in header file
Comments
Post a Comment