WHAT IS THE DIFFERENCE BETWEEN ARRAYS AND COLLECTION?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C# 
C#
 1041  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What is the difference between arrays and collection?

    Array:

    You need to specify the size of an array at the time of its declaration. It cannot be resized dynamically.

    The members of an array should be of the same data type.

    Collection:

    The size of a collection can be adjusted dynamically, as per the user's requirement. It does not have fixed size.

    Collection can have elements of different types.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!