A
andrew.ropson
I need to generate a Type instance from a string decription but not
the System.<typename> the raw type name so Type.GetType() won't work.
e.g.
string strTypename = "short"; // in practice this is read from a
database
Type shortType1 = typeof(short);
Type shortType2 = Type.GetType("System.Int16"); // if there is a
function to go from "short" to "System.Int16"
// this is what I want
Type dynamicType = typeofFromName(strTypeName); // ability to get the
type based on the true type name
I could of course write my own conversion function, but before I do
that, is there anything that does this already?
Thanks
the System.<typename> the raw type name so Type.GetType() won't work.
e.g.
string strTypename = "short"; // in practice this is read from a
database
Type shortType1 = typeof(short);
Type shortType2 = Type.GetType("System.Int16"); // if there is a
function to go from "short" to "System.Int16"
// this is what I want
Type dynamicType = typeofFromName(strTypeName); // ability to get the
type based on the true type name
I could of course write my own conversion function, but before I do
that, is there anything that does this already?
Thanks