What is difference between Generic and Non generic collection - cSharp Coder

Latest

cSharp Coder

Sharp Future

Wednesday, August 12, 2020

What is difference between Generic and Non generic collection

 Non - generic and generic collection?

Generic collections - These are the collections that can hold data of same type and we can decide while initializing what type of data that collections can hold.

Advantages - Type Safe, Secure, reduced overhead of implicit and explicit conversions.

Non generic collections: it hold elements of different datatypes, it hold all elements as object type.
so it includes overhead of implicit and explicit conversions.There can be runtime errors

No comments:

Post a Comment