How to create an object of T using Reflection

suggest change

Using the default constructor

T variable = Activator.CreateInstance(typeof(T));

Using parameterized constructor

T variable = Activator.CreateInstance(typeof(T), arg1, arg2);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents