February 2005 Entries

C# 2.0's Generics - Are we missing some constraints?

I really do like the “Whidbey” generics for both C# and VB.net.  In my opinion, they bring a good solution to some problems with gaps in strong typing to the .net family.  Great stuff, really. However, I'm not happy with one of the constraints on constraints.  I'll endevor to explain.  Hopefully this is either addressed or (at the least) acknowledged by those in the know.  (Or, if I'm an idiot, feel free to let me know in comments) For a good background on C# generics, see this article on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/csharp_generics.asp Okay, so let's say I have a generic collection that sorts items:1public class SortEx<T>2{3   ...4    public void...

posted @ Thursday, February 17, 2005 4:19 PM | Feedback (1)