using System; using System.Collections.Generic; using System.Linq; using System.Text; using System; namespace ArrayProgram { class Array { static void Main(string[] args) { int[,] w = new int[5, 2] { { 0, 4 }, { 1, 3 }, { 2, 3 }, { 3, 4 }, { 4, 2 } }; int i, j; for (i = 0; i < 5; i++) { for (j = 0; j < 2; j++) { Console.WriteLine("w[{0},{1}] = {2}", i, j, w[i, j]); } } Console.ReadLine(); } } }
Output :
Tags:
csharp.net