Re: Generics: Inheritance and Interface questions
Tech-Archive recommends: Fix windows errors by optimizing your registry
Stampede wrote:
1. Can an interface be gerneric? I want the implementing class to be
generic, so the interface has to be.
Yes, no problem.
2. I have a gerneric class, which I want to use as a base class for my own.
But in the subclass I do now the exact type which will be processed and I
don't want anyone to have the ability of changing this. Is it possible to
extend a gerneric base class with a non-gerneric class? And if so, how?
Sure, easily. Like this:
class MyTypedIntList : List<int> {
...
}
Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619 http://www.sturmnet.org/blog
.