Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Initialisation d’un tableau à plusieurs dimensions

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

using System;
 
public class InitialisationMultiDimens
{
    public static void Main()
    {
        int[,] matrice = { {1, 1}, {2, 2}, {3, 5}, {4, 5}, {134, 44} };
 
        for (int i = 0; i < matrice.GetLength(0); i++)
        {
            for (int j = 0; j < matrice.GetLength(1); j++)
            {
                Console.WriteLine("matrice[{0}, {1}] = {2}", i, j, matrice[i, j]);
            }
        }
    }
}

No comments yet.

Leave a Comment