Set a value to the element at the specified position in the three-dimensional Array in CSharp

Description

The following code shows how to set a value to the element at the specified position in the three-dimensional Array.

Example


/*  w  ww .  j  av  a 2  s.com*/
using System;

public class SamplesArray  {

   public static void Main()  {
      String[,,] myArr3 = new String[5,5,5];

      myArr3.SetValue( "one-two-three", 1, 2, 3 );
      Console.WriteLine( "[1,2,3]:   {0}", myArr3.GetValue( 1, 2, 3 ) );
   }

}

The code above generates the following result.





















Home »
  C# Tutorial »
    Data Types »




C# Data Types
Bool
Byte
Char
Decimal
Double
Float
Integer
Long
Short
String
C# Array
Array Example
Byte Array
C# Standard Data Type Format
BigInteger
Complex
Currency
DateTime
DateTimeOffset
DateTime Format Parse Convert
TimeSpan
TimeZone
Enum
Null
tuple
var