jeudi 8 juin 2017

Create Object from non-existing Type

Is it possible to pass an object and it's Type parameter to an application that does not have the Type and create an instance of it?

For instance

Application A

Has Type Foo

We instantiate it and send the value as Object and the Type to Application B

Application B

Has no References to the type Foo

So is it possible to say System.Convert.ChangeType(object, Type) and be able to convert the object or CreateInstance to be able to make a new instance of the type?

If that is confusing then lets say, I am unsure if the ChangeType uses the Type Information to convert the type or if it does a DLL lookup for short.





Aucun commentaire:

Enregistrer un commentaire