I have object o which has unknown type. I also have a type t to which I want to convert my object.
object o = GetExampleObject();
Type t = GetExampleType();
When I try to invoke:
Convert.Invoke(o, t);
I get error:
Object must implement IConvertible.
Is there any way to cast it?
Aucun commentaire:
Enregistrer un commentaire