Generics in C#

What is Generics in C# Programming Language?

Generics allow us to create type safe collections with no boxing and un-boxing overhead. It is a concept that allows us to achieve parametric polymorphism. C# is a strongly typed language, i.e., objects in C# should have a type to holding any value. This enforces language interoperability and security but restricts the programmer to specify the …

What is Generics in C# Programming Language? Read More »

Csharp Generics Collection Interfaces

Collection Interfaces   The .NET Framework provides two sets of standard interfaces for enumerating and comparing collections: the traditional (nontype-safe) and the new generic type-safe collections. Here we focuses only on the new, type-safe collection interfaces as these are far preferable.   You can declare an ICollection of any specific type by substituting the actual …

Csharp Generics Collection Interfaces Read More »