G
Guest
Hi,
I have a question when I do a data type cast.
the common way when we do a cast, is we know the type we want to cast to,
i.e. we want to cast object to string,
object xyz = "question";
(string)xyz;
now we only have a type object of System.String type
Type type = Type.GetType("System.String");
how do we use this "type" object to do "(string)xyz"?
Thanks.
Richard
I have a question when I do a data type cast.
the common way when we do a cast, is we know the type we want to cast to,
i.e. we want to cast object to string,
object xyz = "question";
(string)xyz;
now we only have a type object of System.String type
Type type = Type.GetType("System.String");
how do we use this "type" object to do "(string)xyz"?
Thanks.
Richard