0
String commClass = "ClassA";
Assembly objAssembly = Assembly.Load("DemoClassLibrary");
IA iFace = (IA)objAssembly.CreateInstance(commClass);
iFace.run();
我在IFACE可變建立出錯運行時對象
public interface IA
{
void run();
}
public class ClassA : IA
{
string str = string.Empty;
public void run()
{
Console.WriteLine("{0}", DateTime.Now.Ticks);
Logger.Logger.CreateLog(DateTime.Now.Ticks.ToString());
}
}
上面得到null是該命名空間DemoClassLibrary類聲明
u能請幫助我..
thnx
簡直太棒了爵士.. !!!! 謝謝 希望我有一天會變得像你一樣:) – 1Mayur