I think interior_ptr is a native type so you'd use a normal C++ array
(not
cli::array). You can make .NET arrays of tracking handles of course
(cli::array<T^, 2> where T is a .NET reference type).
Of course, you could store integer indices in the array instead of
interior_ptr.
I've tried using an array of tracking handles like this...
cli::array<float ^, 2> ^handles;
cli::array<float, 2> ^data;
data = gcnew cli::array<float, 2>{
{0, 0},
{10, 10},
{20, 20},
{30, 30},
{40, 40},
{50, 50},
{60, 40},
{70, 30},
{80, 20},
{90, 10},
{100, 0}
};
handles = gcnew cli::array<float ^, 2>{
{data[0, 0], data[0, 1]},
{data[1, 0], data[1, 1]}
};
data[0, 0] = float(100);
data[0, 1] = float(100);
MessageBox::Show(handles[0, 0]->ToString());
In this case the message box displays 0 instead of 100...
I've also tried replacing cli::array<float ^, 2> ^handles; with
cli::array<System::Object ^, 2> ^handles; with the same result...