What are C# Arrays?

Rate this post

Create variables on memory and store data in these variables that we create
we aim to. Variables that we can keep the same type of data under one name are called arrays.

Seriesin order to access this data on it, we can access it via the index value of the index.

First of all, type the array, i.e. integer, string, double, etc. we need to define it. Then the array name and how many data the array will contain must be entered.


int student=0;
Console.Write(“Enter the number of students: “);
student = Convert.ToInt32(Console.ReadLine());
string[] child = new string[student];

for(int i=0;” student;i++)
Console.Write(“Enter the student name:”);

Enter the number of students: 5



Enter the student name: Yaska
Enter the student name: Jessica
Enter the student name: Justin
Enter the student name: Clay
Enter the student name: Hannah

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button