Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Exemple de tableau à 2 dimensions en CSharp

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();
    }
  }
}

No comments yet.

Leave a Comment