I tried, I failed.
I was playing today with a feature I was sorta considering implementing. I wanted to implement it in a common base class, but that actually wasn't possible in this case - I really don't my guys at work to modify autogenerated classes (the code spat out when you make a web reference). If you mod it, it's fine - up until the point when you update the reference, and then you have to remember to make the same mod again. Not good.
So I looked at maybe requiring the devs to write a new class that inherits from the web reference class. Possible, but still annoying. Still means implementing the same code multiple times (once per web reference). For the same reason, I discarded waiting for Whidbey and using partial classes - it'd work, but I'm trying for code reuse.
Then I had a thought. Generics! I can do this with Generics! A common baseclass that can contain all the extra code I want, generated at compile time. So I wrote this:
Public Class Class1(Of V As System.Web.Services.Protocols.SoapHttpClientProtocol)
Inherits V
End Class
How neat is this? I thought it was a fantastic idea.
Unfortunately, when you do this, you get this error: 'class 'Class1' cannot inherit from a type parameter'.
Once I thought about it it a bit more, I guess it sorta makes sense. You don't know if V is NotIneritable, MustInherit, or whatever. It would surely fail at compile time if that happened, but it's a lot safer to not allow this sort of thing to happen.
Disappointing though :)