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.
April 19th 20 at 12:39
2 answers
April 19th 20 at 12:41
Solution
April 19th 20 at 12:43
Solution
but still you can distinguish between the dummies, and to give the version docks ../EN-us/.. - Rodrigo.Wehner commented on April 19th 20 at 12:46

Find more questions by tags C#