what is a Double Pointer equivalent in c#?

Viewed 1761

I'm trying to convert a c++ code into c# and I encountered a double pointer. I'm wondering how can double pointers be implemented in c#?

if I have say,

MyClass **MyClasses;

and it was initialized like this.

MyClasses = new MyClass*[ClassNums];

in another function inside the class, every subitems were initialized in a loop.

for(num = 0; num < classnum; num++)
{
    MyClasses[subnum] = new MyClass();
}

and this double-pointer is being used like this.

MyClasses[subnum]->MyMethod();

How can this be converted into c#? I tried to use an array of MyClasses[] but i'm not quite sure about it. Also, I cannot test this because it's from a static library and the components which are using it are not yet converted into c#. Should I use generic lists or something?

1 Answers
Related