Skip to main content

Posts

Showing posts with the label Generic Colletion

Non-Generic Collection and Generic Collection in.NET

What is Collection in .NET? What is Collection in .NET? By Vishal Thakur Introduction Microsoft .NET provides a variety of collection data types that can store a set of records or values. There are two types of collections in .NET: generic collections and non-generic collections . Generic collections are type-safe at compile time, providing better performance compared to non-generic collections. They support type parameters when constructed and do not require boxing-unboxing or type conversion from the Object type when adding or removing items. Non-generic collections store items as Objects, require casting, and are not recommended for modern development. Most developers prefer generic collections because they are faster, safer, and less prone to exceptions and compile-time errors. To use non-generic collections, you need to include ...