I have 100 classes all having similar signature methods just their internal definition is different . I will be passing one of class name as string and I need to create object of that type and call methods . I know I can use "Activator.CreateInstance" but not sure exactly how in this case . For example lets say I have classes named Calculator1 to Calculator100 I am not sure how to cast it in second line depending on Class name string .
ObjectHandle handle = Activator.CreateInstance("NameSpaceCalculator", "Calculator1");
var Calculator = (Calculator1)handle.Unwrap();
dynamic. However you can still useReflectionto access the created object's members without having to cast it to the desired type.