使用ILSPY我發現,有BV method
可用內bvlsFortran.dll
然而ILSPY說,這是CALCBV!BV
,看看是否是正確的,我添加在Visual Studio中的參考,然後在主: 調用方法
![enter image description here][3]
Assembly SampleAssembly;
SampleAssembly = Assembly.LoadFrom("bvlsFortran.dll");
// Obtain a reference to a method known to exist in assembly.
MethodInfo Method = SampleAssembly.GetTypes()[0].GetMethod("CALCBV!BV");
// Obtain a reference to the parameters collection of the MethodInfo instance.
ParameterInfo[] Params = Method.GetParameters();
// Display information about method parameters.
// Param = sParam1
// Type = System.String
// Position = 0
// Optional=False
foreach (ParameterInfo Param in Params)
{
Console.WriteLine("Param=" + Param.Name.ToString());
Console.WriteLine(" Type=" + Param.ParameterType.ToString());
Console.WriteLine(" Position=" + Param.Position.ToString());
Console.WriteLine(" Optional=" + Param.IsOptional.ToString());
}
它是正確的,它顯示有關它的信息。
我該如何調用該方法? 我不能寫CALCBV!BV
因爲編譯器抱怨... 如果我寫BV
或bvlsFortran
方法它不會找到它。