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# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -