HI WELCOME TO SIRIS

Basic C# Interview Questions on arrays

Leave a Comment

What is an array? 

An array is a data structure that contains several variables of the same type.

What are the 3 different types of arrays?
1.
 Single-Dimensional
2. Multidimensional
3. Jagged

What is Jagged Array? 
A jagged array is an array of arrays.

Are arrays value types or reference types?Arrays are reference types.

What is the base class for Array types? 
System.Array

Can you use foreach iteration on arrays in C#?Yes,Since array type implements IEnumerable, you can use foreach iteration on all arrays in C#. 

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.