I looked at some sample code using C# generics. Why and when should I use them?
All the examples were complex. I need a simple, clear example that gets me started wi
In a nutshell, generics allow you to write classes that work with objects of any type, but without having to cast the data to Object. There are performance benefits for this, but it also makes your code more readable, maintainable, and less error-prone.
You should always use generics as opposed to the .NET 1.1 style classes when possible.