Re: Derive concrete type from generic type.
Frans Bouma <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <00e901c85ceb$46d08600$d4719200$@nl> |
> 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. To the best of my limited generics knowledge, I have to derive
> a MyFieldList<T> anyway, but all my refinements in the child class only
> refer to type Field, so the generic parameter is basically redundant. Is
> there any way around this?
public class MyFieldList : List<Field>
{
...
}
FB
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com