Qus:    What is the Generic and non generic collections?
Nov 19, 2020 10:46 2 Answers Views: 107 RAMU

 



Two types of collections is there one is generic collection another one is non generic collection.

Generic Collection:

We can group one type of object in single collection is called generic collection. Here we dont need to convert particular type like string, int, etc.

Non Generic Collection:

We can group any type of object in single collection is called non generic collection. Here we need to convert particular type like string, int,etc., otherwise we will face issue in run time.

Prev Next
Answers (2)
SAI Nov 20, 2020 11:06
Answer:   Two types of collections is there one is generic collection another one is non generic collection.
Generic Collection:
We can group one type of object in single collection is called generic collection. Here we dont need to convert particular type like string, int, etc.
Non Generic Collection:
We can group any type of object in single collection is called non generic collection. Here we need to convert particular type like string, int,etc., otherwise we will face issue in run time.

PARTH Nov 21, 2020 01:52
Answer:   Generics Collections - Generic collections hold elements of same datatypes.
For example ? List, Dictionary, Hashset

Non-Generics Collections - Non-generic collections hold elements of different datatypes.
For example - ArrayList, BitArray.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect