Posts on generics in C# 2.0 and later
published: Thu, 27-Oct-2005 | updated: Sat, 6-Aug-2016
Here are the articles I've written regarding C#'s generics.
A little linked list trick
Let's have a little bit of fun today and talk about a minor yet elegant algorithmic change to a singly-linked list to make it a teensy bit more functional, and in doing so talk a bit about generics. This is certainly not earth-shattering stuff, but merely an enjoyable diversion from the horrors of your daily development. I'll be using C# 2.0 to implement this algorithmic amuse-bouche, so fire up your Visual Studios. Read more...
C# generics and covariance, part one
Time to blow your mind. You've downloaded Visual C# Express or maybe
you're using the full Visual Studio 2005 beta 2. You've seen that C#
2.0 now includes generics, or a way of writing classes that accept
type parameters. You've played around with List<T>
and seen that it's
pretty good. You're feeling comfortable with generics, right? (Updated
28-Jun-2005) Read more...
Generic Properties
On last week's Visual C# chat on MSDN, someone asked a question about generic properties: why weren't we providing them in C# 2.0? A little thought game can reveal one answer. Read more...