C++/CLI_ C# との間で List の受け渡し

ex ) List は int 配列

C#

List<int[ ]> get = Native.Test.Hoge(pictureBox.Image as Bitmap);
// var get でも ok

 

C++/CLI

namespace Native
{
    public ref class Test
    {
        public:
        static System::Collections::Generic::List<array <int>^ >^ Hoge()
        {
            auto list = gcnew System::Collections::Generic::List<array<int> ^ >();
            array<int> ^ ary = gcnew array<int>(3);
            ary[0] = 10;
            ary[1] = 20;
            ary[2] = 30;
            list->Add(ary);
           
            return  list;
        }
    }
}

 

 

以上。