(T)Activator.CreateInstance(typeof(T), param1, param2);
More Related Contents:
- Pass An Instantiated System.Type as a Type Parameter for a Generic Class
- How to get the type of T from a member of a generic class or method
- List or IList [closed]
- Check if a class is derived from a generic class
- Creating a Generic type instance with a variable containing the Type
- Testing if object is of generic type in C#
- Value of type ‘T’ cannot be converted to
- C# Create New T()
- What are generics in C#? [closed]
- Passing dynamic object to C# method changes return type
- How to compare values of generic types?
- What does “T” mean in C#?
- How to call generic method with a given Type object? [duplicate]
- Shortcut for “null if object is null, or object.member if object is not null” [duplicate]
- Convert DataTable to generic List?
- Is there a reasonable approach to “default” type parameters in C# Generics?
- Inheritance on a constrained generic type parameter
- What does denote in C# [duplicate]
- Why does IEnumerable inherit from IEnumerable?
- How to do generic polymorphism on open types in C#?
- Type must be a reference Type Error When Calling Generic Method
- Restricting a generic type parameters to have a specific constructor
- Mocking generic methods in Moq without specifying T
- .NET Casting Generic List
- The given key was not present in the dictionary. Which key?
- Checking type parameter of a generic method in C#
- Can you use “where” to require an attribute in c#?
- Get derived class type from a base’s class static method
- C# List: why you cannot do `List foo = new List();`
- How to use Activator to create an instance of a generic Type and casting it back to that type?