c# - Setting generic type only in one class -


i have 2 generic classes:

public class first<t> {     ... } public class second<t> {     ... } 

i use second class parameter first class constructor:

var instance = new first<int>(new second<int>()); 

is possible specify generic type (integer in example) first class constructor this:

var instance = new first<int>(new second()); 

?

i believe type inference generic constructor arguments being added c# 6. right now, answer no.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - WPF+EF - The operation cannot be completed because the DbContext has been disposed -

javascript - Three.js Raycaster not detecting scene mesh -