If you know that you will never have multiple types with the same name that are in different namespaces, you can simply iterate over all types in the assembly and filter the type name. For example, this works:
var typenames = new[] { "String", "Object", "Int32" }; var types = typeof(object).GetTypeInfo().Assembly .GetTypes() .Where(type => typenames.Contains(type.Name)) .ToArray(); // A Type[] containing System.String, System.Object and System.Int32
This will not necessarily break if you have several types with the same name, but you will get all of them in the list.
Tomas lycken
source share