Exemple de tableau à 2 dimensions en CSharp

Author:

ArrayList, Array, HashTable, BitArray
{filelink=18419}

using System; 

public class Tableau2Dimensions
{
  public static void Main()
  {
    int t, i;
    int[,] table2D = new int[3, 4];  

    for( t = 0; t < 3; ++t)
    {
      for(i = 0; i < 4; ++i)
      {
        table2D[t,i] = (t*4)+i+1;
        Console.Write(table2D[t,i] + " ");
      }
      Console.WriteLine();
    }
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *