lundi 30 juillet 2018

How to access current assembly that my assembly(dll) IS IN via reflection?

My question is simple. I have a dll and my dll will be used in other dll. I want to access other dll's properties and methods. But i also want to implement my code as if i am in that dll so when my dll is in other dll it will work perfectly.

For example, the other dll has property called Id and it returns value depending on which form it is executed. Thus i want to access this field's corrects value via reflection.

Tried Assembly.GetExecutingAssembly() and typeof(program).Assembly but no help..





Aucun commentaire:

Enregistrer un commentaire