All Array programs in C# with examples


C# Array is a collection of variables belongings to the same data type. We can store group of data of same data type in an array.


EXAMPLE FOR C# ARRAYS

  1. int[] intArray;
  2. intArray = new int[5]; // Array storing 5 items only starting from index 0 to 4
  3.  
  4. // Defining arrays of different types
  5.  
  6. double[] doubleArray = new double[10];
  7. char[] charArray = new char[5];
  8. bool[] boolArray = new bool[6];
  9. string[] stringArray = new string[50];

Arrays are divided in four categories.

  • Single-dimensional array
  • Multi-dimensional array or rectangular arrays
  • Jagged arrays
  • Mixed arrays

In this exercise we will focus on one-dimensional and multi-dimensional array. We will learn to implement and use arrays in C# programming language using following examples.

techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

     






Related Topics





Popular Posts