Multi Dimension Arrays

  • Thread starter Thread starter SouthSpawn
  • Start date Start date
S

SouthSpawn

If I have an array that is
string[,] MyArray = new string[1,1]

Then I do the following.

string[0,0] = "A";

How can I "ReDimension" my multi dimension array?

In VB.Net they have the ReDim Keyword.

Thanks,
Mark
 
SouthSpawn said:
If I have an array that is
string[,] MyArray = new string[1,1]

Then I do the following.

string[0,0] = "A";

How can I "ReDimension" my multi dimension array?

In VB.Net they have the ReDim Keyword.

Arrays are of a fixed size in .NET - even VB.NET basically just creates
a new array and copies the contents of the old array into it. You just
need to do it explicitly in C#.

Have a look at Array.Copy, which should help you.
 
Back
Top