One small help in my Direct2D application. I have IVector<double>^ points collection in my C++ application. I will set this points collection from my C# code. So i can set IList<double> from my C# to the IVector<double>^ points to get the List of double.
Here is my requirement that, I have to set the collection of double[] to the C++ code. In C# we can simply declare the collection with the following syntax List<double[]>. But as i am new to C++ , i am not much familiar with the available API in the C++ library in Windows Store apps. Any one can you please help me on this.?. So eventually my requirement is simple in two lines that " I should be able to set the List<double[]> to my C++ library from my C# code".
Any help much appreciated.
-David C
I'm not 100% sure what your issue is, since you haven't shown any code at all, but I think you might just be tripping over the array syntax.
In C++/CLI, you can declare an array with square brackets (
double[]), and that works, but it's an unmanaged array. You can't have that as a field in a managed class, and passing that to managed APIs isn't easy.The syntax for a managed array is
array<double>. This is a reference type, so you'll want the^when you have a variable of this type.Therefore, your
List<double[]>in C# turns intoList<array<double>^>in C++/CLI.