C# Parameter-count mismatch-Fehler beim übergeben von Objekt-array in der invoke-Methode( Reflexion)

Ich versuche zu rufen-Funktion dynamisch, hier und passing argument, weiß nicht, warum es Fehler gibt.

Assembly objAssembly;
objAssembly = Assembly.GetExecutingAssembly();

//get the class type information in which late bindig applied 
Type classType = objAssembly.GetType("Project." +strClassname);

//create the instance of class using System.Activator class 
object obj = Activator.CreateInstance(classType);

//fixed object  objValue[5];/* = new object[5];
object[] _objval = new object[3];

MethodInfo mi = classType.GetMethod("perFormAction");
mi.Invoke(obj, **_objval**); //Error here ..

Ich weiß nicht, warum es wirft parameter count mismatch hier.

  • Was bedeutet die Signatur für perFormAction-Methode aussieht? Und was genau die Fehlermeldung besagt.
Schreibe einen Kommentar