September 19, 2006
Generics in C#
In Scott Swigart's latest video tutorial, he focuses on the benefits of using generics in C# including faster performance, better compile-time checking, and better Intellisense support. Starting with collections, he first walks through the limitations of a traditional collection, such as the perf hit from boxing and unboxing object references stored in a collection, then uses a generic List class that doesn’t require such casting. Scott also shows the benefits of using a Dictionary in place of a Hashtable.
Posted by John Dorsey at 04:03 PM Permalink
|