Initial values of the array elements can be specified using an array initializer, which is a list of expressions written between the delimiters { and }
static void ArrayExample()
{
int[] Marks = {56, 78, 45};
int[,] Matrix = new int[5, 5];
string[] Students = {"George Kutty", "Madhavan Nair", "Haneef Iqbal"} ;
for (int i=0;i
{
Console.WriteLine("Student Name: {0} - Marks {1}" , Students[i], Marks[i]);
}
}
No comments:
Post a Comment