Sunday, May 10, 2009

Basic C# Interview Questions on arrays

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#.

No comments:

Post a Comment