you can make an "ordinary" array ....
MyType[] Line = new MyType[2];
or a general list ....
List<MyType> Line = new List<MyType>(); // list is empty, still have to add n elements Line.Add( new MyType() ); Line.Add( new MyType() );
how you go depends on what you need. If you need an "array" that grows dynamically while your program is running, go to the general list. if not, go to the array.
Now you need to keep in mind that either one of them is based on 0, and not arbitrarily, starting with N, as Delphi does.
you can now simulate this with a HashTable or Dictionary if you need to.
source share