.net - How to use templates with C++/CLI 2010? -
.net - How to use templates with C++/CLI 2010? -
i've got next method in c#:
public static t[] getresult<t>(ulong taskid) { homecoming getresult(taskid).cast<t>().toarray(); }
and i'm trying utilize in managed c++ 2010 this:
array<urlinfo^>^ arr=scheduler::getresult<urlinfo>(taskid);
where i'm getting
error 3 error c2770: invalid explicit generic argument(s) 'cli::array<type,dimension>
what doing wrong?
if urlinfo
value type, don't want ^
.
try
array<urlinfo>^ arr
if urlinfo
reference type, need ^
when calling getresult
.
arr=scheduler::getresult<urlinfo^>(taskid);
either way something's wrong. based on error message, think it's first case.
.net c++-cli visual-c++-2010
Comments
Post a Comment