Get the value at the specified position in the multidimensional Array in CSharp
Description
The following code shows how to get the value at the specified position in the multidimensional Array.
Example
using System;//from www . j av a 2 s.co m
public class SamplesArray {
public static void Main() {
String[,,,,,,] myArr7 = new String[5,5,5,5,5,5,5];
int[] myIndices = new int[7] { 1, 2, 3, 0, 1, 2, 3 };
myArr7.SetValue( "one-two-three-zero-one-two-three", myIndices );
Console.WriteLine( "[1,2,3,0,1,2,3]: {0}", myArr7.GetValue( myIndices ) );
}
}
The code above generates the following result.