I have code like this:
Type typPrecise = MostPrecise(typeof(int), typeof(double));//Evaluates to double
var varGeneric = typeof(Number<>);
var varSpecific = varGeneric.MakeGenericType(typPrecise);
dynamic nmNumber = Activator.CreateInstance(varSpecific);
The nmNumber is of dynamic type and essentially produces a Generic Number. How do I then specify the number of items in Number.
I basically want to accomplish this but by using the dynamic code above:
Number<typPrecise> whatever = new Number<typPrecise>(10);
An answer using 4.0 concepts is welcome.