Generic Compound Types in C# -



Generic Compound Types in C# -

i have generic types a<t> , b<t> , want build type c<t> : a<b<t>> can see specific kind of a<t>.

it tried defining c get

the type `a<b<t>>' not contain constructor takes `0' arguments

just in case built constructor

public c () {}

but still error.

note: abstraction of problem. assume , b have constructor form

public a/b (t t)

your generic type declaration okay, parameterless constructor doesn't have counterpart in a<t>.

you should phone call base of operations class' constructor parameters requires.

something like:

public c() : base("param1", "param2", 3) { }

c# generics

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -