0
我正在調用從程序集中的函數之一,但我得到MissingMethodException。我在.netreflector中打開了exe文件,並顯示該函數在正確的地方可用,雖然它給出了錯誤。這是代碼。InvokeMember調用拋出MissingMethodException
private void button2_Click(object sender, EventArgs e)
{
Assembly obj = Assembly.LoadFrom("Solo4O.exe");
Type datacrypt = obj.GetType("Orch.DC");
object[] objects = new object[3];
....
datacrypt.InvokeMember("GetCryptedXML", BindingFlags.InvokeMethod |
BindingFlags.Static |
BindingFlags.Public,
null, datacrypt, objects, null);
}
@Akie:'objects'數組有多大?如果你能想出一個簡短但強制性的程序來證明這個問題,那真的很有幫助... – 2010-09-15 10:03:05
@Akie:請編輯你的問題,使用完整的格式,而不是寫在評論中。還要確保你已經提供了所有必需的代碼 - 我希望能夠構建和運行你提供的代碼。請閱讀http://tinyurl.com/so-hints – 2010-09-15 10:19:34
嗨,喬恩,我用完整的代碼更新了主線程。謝謝。 – Akie 2010-09-15 10:34:15