For loop for array
/*
* C# Programmers Pocket Consultant
* Author: Gregory S. MacBeth
* Email: gmacbeth@comporium.net
* Create Date: June 27, 2003
* Last Modified Date:
*/
using System;
namespace Client.Chapter_3___Structs__Enums__Arrays_and_Classes
{
public class Arrays2Chapter_3___Structs__Enums__Arrays_and_Classes
{
static void Main(string[] args)
{
//multidimensional array
int[,] MyIntArray = new int[5, 5];
for (int x = 0, y = 0; x < 5; x++, y++)
{
MyIntArray[x, y] = 0;
}
}
}
}
Related examples in the same category