If you’re not comfortable using C# Generics in your code, be sure to check out this great article by Karl Seguin. It’s an easy read, and it covers all the important ideas you’ll need to get your head wrapped around these things. I’ve mentioned Generics a couple times on this blog – they’ve been a …
I was looking forward to .Net Generics since I learned they’d be included in .Net 2.0. Having to build an entirely new class to implement a strongly-typed collection was a drag, when Collection(of..) or Collection<> would have solved the problem in a fraction of the time.
So I’ve been using them for typed collections, and they’re great. The part I didn’t anticipate was what a lifesaver they’d be in a thousand other instances.
I’ll admit this may not be a subject on the tip of America’s tongue, but there are some things that are bugging me about the state of the software development profession, and I thought that perhaps a good place to start would be with something that’s working extraordinarily well.
Type safety, by the way, has nothing to do with an airbag on your keyboard, so this article will be a bit technical, but I’ll try to keep my explanations simple enough for a wide audience. You may also recall a recent article about Generics — these concepts are very closely related, as you’ll seen shortly.