c# - Getting actual type from generic type -


i'm wondering if possible. have generic class looks so:

public class someclass<t> : someinterface {     public someclass()     {       var somevariable = new otherclass("string_parameter");     } } 

what i'd use generic parameter in otherclass constructor, sort of otherclass(t.gettype().tostring()) having no luck. i'm after possible, or can not @ t parameter in fashion?

you're looking typeof(t).name


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -