By 22/07/2015 12 Comments

Arrays In C#

  • Arrays in C# are the collection of similar data items these items are also called elements.
  • Array index always starts from 0 [zero] and it defines the position of an element within an array
  • Arrays are pure data structures and reference types.
  • With the help of an array we can store more than one value in a single variable. Each specific value in an array can be accessed by an index.
  • The principal advantage of an array is that it organizes data such a way that it can be easily manipulated.
  • By using an array we can store different types of records such as number of employees, list of product items etc.
  • Arrays are implemented as objects in C#.
  • Value store in a specific location of an array is called an ELEMENT.
  • Once an array is created, its size is fixed. C# does not support dynamic arrays.
  • Array indexes are 0-based. That is, if the length of a dimension is n, the index values range from 0 to n – 1 (finding array’s last index).
  • Once an array has been created, we can access its elements by using foreach or for loop.

Types of arrays in C#:

  • Single dimensional arrays
  • Multidimensional arrays
  • Jagged arrays

Posted in: C# Basics, C#.NET

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .