Array Represent very important data structure in C#. array consist of some value with same data type. amount of member in a array determined array variable declaration moment. in accessing each array member, we use functioning index number as indicator of array element position. Array represent part of data type have the character of reference, where each variable of reference to certain value.

using System.Collections.Generic;
using System.Text;
namespace Array
{
class Program
{
static void Main(string[] args)
{
int[] score;
score = new int[10];
Console.WriteLine("Input Score");
for (int i = 0; i <= 9; i++)
{
Console.Write(" Input Score {0} :",i+1);
score[i] = int.Parse(Console.In.ReadLine());
}
Console.WriteLine("List");
for (int j = 0; j <= 9; j++)
{
Console.WriteLine("score {0}:{1} ", j + 1, score[j]);
}
Console.ReadLine();
}
}
}
RSS Feed
9/02/2009 |





