How in c# to create an object depending on the type?
May I have some Type object t. Also, there are a number of classes with a common interface (even if the classes are called A, B, and the interface - AB). They have constructors that take as arguments the same settings. How can I create an object of the appropriate type depending on t? To use switch/if and such is not desirable, because such classes can be at least 50.