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

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -