I want to be able to get the actual Type of a string value I receive by some means (i.e from database) so I can use that Type in generic method like DoSomething
DoSomething
You can use a dictionary which holds all your types with strings keys:
var d = new Dictionary(); d.Add("Car",typeof(Car)); d.Add("Plane",typeof(Plane));
Then if you get the string "Car" from the database you can get the type like this:
var myType = d["Car"];
Then use myType as the real Type.
myType