I have some class. And by reflection i get it constructor and parameters count/type. also i have builder for any type. so i need to make
var constructor;
var params = constructor.GetParameters();
object[] args;
foreach( var param in params ) {
var type = param.Parametertype;
args[] += (object)Build<type>();
}
Activator.CreateInstance(Type, args);
The problem, that i can not pass the type of parameter as generic argument.
No, you'll need to use reflection to call the generic method too: