What are collections and generics

What are collections and generics?

E

Expert

Verified

A collection can be defined as a group of related items that can be referred to as a single unit. The System.Collections namespace provides you with many classes and interfaces. Some of them are - ArrayList, List, Stack, ICollection, IEnumerable, and IDictionary. Generics provide the type-safety to your class at the compile time. While creating a data structure, you never need to specify the data type at the time of declaration. The System.Collections.Generic namespace contains all the generic collections.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.