vendredi 24 avril 2020

.NET, C#, reflection GetMethod return null (trying to get Methods inside third party dll)

I am trying to create an instance and call a method inside the DLL, but for some reason GetMethod returns null. Can anyone please advise what is wrong here?

//this works fine
Type myDllType = Type.GetTypeFromProgID("Application.name");

//this works fine too
object dllInstance = Activator.CreateInstance(myDllType);

//this returns null,  I am 100% sure "methodmd" exists
MethodInfo methodCommand = myDllType.GetMethod("methodmd");




Aucun commentaire:

Enregistrer un commentaire