This is a known issue.
Effectively you can't use an instance of a thing until it can be
instantiated and it can't be instantiated until you pass it the template
parameter...

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
> I have created a custom control that uses a generic class to determine
> what type of objects will be managed in the control.
[quoted text clipped - 11 lines]
>
> Jared
Jared - 15 Mar 2007 21:04 GMT
Thanks. That leads to a second question. I have a similar problem if I
derive a class from the generic class that defines the type.
Using the original example:
class mysecondclass:myclass<someclass>{
}
Gives me an error stating that it cannot create myclass, even though the
template was passed.
I'm guessing it is related to the original issue, but I'm just curious why?
thanks.
> This is a known issue.
> Effectively you can't use an instance of a thing until it can be
[quoted text clipped - 16 lines]
>>
>> Jared
Oliver Sturm - 16 Mar 2007 20:16 GMT
Hello Jared,
>class mysecondclass:myclass<someclass>{
>}
>
>Gives me an error stating that it cannot create myclass, even though the
>template was passed.
Are you sure? When I have this:
public class MyGenericPanel<T>: Panel {
public MyGenericPanel( ) {
}
}
public class MySpecificPanel: MyGenericPanel<string> {
public MySpecificPanel( ) {
}
}
I can drop a MySpecificPanel instance on a form in VS designer without a
problem.
Oliver Sturm

Signature
http://www.sturmnet.org/blog