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@foundati‌​on@windows@@@z)

there 2 problems code.

  1. the method test doesn't have body therefore linker error

  2. 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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -