|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Emitting a Generic Type that has a Generic Base ClassHey... I dont know if its possible but i'm trying to emit a class that would
look like this The Base class commes from the code: public class BaseClass<T> { // Whatever implementation... } I want to generate a child class that looks like this: public class ChildClass<T> : BaseClass<T> { } so i want to define ChildClass<> not ChildClass<int> or ChildClass<object> ....is it possible? Patrick <Patr***@discussions.microsoft.com> wrote:
> Hey... I dont know if its possible but i'm trying to emit a class that would By emit, do you mean System.Reflection.Emit, or do you simply mean> look like this compiled C# code? > The Base class commes from the code: This descendant is perfectly possible and legal currently. It's the> > public class BaseClass<T> > { > // Whatever implementation... > } > > I want to generate a child class that looks like this: > > public class ChildClass<T> : BaseClass<T> > { > } standard pattern for deriving from Collection<T>, for example. > so i want to define ChildClass<> not ChildClass<int> or ChildClass<object> What does 'ChildClass<>' mean?> ...is it possible? -- Barry |
|||||||||||||||||||||||