Ken

Ken

  • NA
  • 110
  • 0

Clearing a multidimensional array?

Aug 21 2011 6:16 PM
Hi.  I have this array defined:

public static string[,,] collections = new string[2, 201, 5];

..and I want to be sure it's empty when I call my readconfig function.  I see there is Array.Clear, which you pass Array array, int index and int length.  Does that mean I have to do:

Array.Clear(collections, 0, 2);
Array.Clear(collections, 1, 201);
Array.Clear(collections, 2, 5);

or is there a different / proper way to do it?  Thanks!

Answers (2)