Re: Derive concrete type from generic type.
John Brett <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
> Say I wanted a collection of Field objects, but with some extra
> functionality, say constraints on how fields can be added. I decided
> List<Field> is a good fit for most requirements, but want to derive a
> MyFieldList.
So :-
public class MyFieldList
: List<Field>
{
// override setter functions here to apply constraints...
}
MyFieldList doesn't have to be generic just because it's base class is.
John
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com