c# - Generic class definition with both generic type constraint and inherited type? -


i wondering if possible have both generic type constraint , inherited type?

i not figure syntax out myself or think of possible example at.

code example:

public class test<t> t : itest, new() : ibasetest {  } 

is possible achieve class definition this?

public class test<t> : ibasetest t : itest, new() { }

your class implement interface ibasetest, , generic parameter t constrained types implementing interface itest , having default (parameterless) constructor.

is meant?


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -