C# tutorials

Updated : Oct 01, 2020 in Articles

types of arrays in c#

An array is used to store more than one value with same name.

Each value of the array is identified by using its index position.

General first index is always will begin with zero and it’s known as lower boundary of the array.

Last index of the array will end with (size-1) of the array and it is known as upper bound of the array.

In c# Arrays are reference types

Array is in general user defined data types.

Types of Arrays

These are divided into 7 types.

  1. Single dimensional Array
  2. Two dimensional Array or Multi dimensional Array
  3. Normal Arrays(According to memory size)
  4. Huge Arrays(According memory size)
  5. Static Array
  6. Dynamic Array
  7. Jagged Array

Single dimensional Array:

An array that contains either a single row/a single column is known as single dimensional Array.

Multi Dimensional Array:

An array that contains more than one rows and more than one column is known as Multidimensional Array.

Ex:

Normal Array:

An array which occupies the memory size of <=64 kb is known as normal Array.

Huge Array:

An array which occupies the memory size of >=64 kb is known as huge array.

Static Array:

An array that size is fixed throughout the program and doesn’t change during the runtime is known as static array.

Dynamic Array:

An array that size is not fixed throughout the program and will change during the runtime then it is known as “dynamic Array”.

Jagged Array:

 An array which contains one or more within it is known as “jagged Array”.It is also known as Array of Array.

Example:

Latest posts by DuttaluruVijayakumar (see all)
Like
Like Love Haha Wow Sad Angry

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x