Assembly.Load("Web_Sn_Extend_Library.dll") 在当前路径下否?up

解决方案 »

  1.   

    Assembly.Load(String) method takes a long form of the assembly nametryAssembly aBox = Assembly.LoadFrom(aBoxFile.FullName);
    Type t = aBox.GetType("Web_Sn_Extend_Library.Extend_Library");
      

  2.   

    我按你的改了可是提示File "Web_Sn_Extend_Library.dll" Error: 未将对象引用设置到对象的实例
      

  3.   

    here is the code I used on my machine(.NET 1.1):Assembly aBox = Assembly.LoadFrom(aBoxFile.FullName);
    Type t = aBox.GetType("Web_Sn_Extend_Library.Extend_Library");
    Response.Write("***" + (t!=null));
    MethodInfo m = t.GetMethod("method1",BindingFlags.Public | BindingFlags.Instance);
    object o = Activator.CreateInstance(t);
    string i =(string) m.Invoke(o,null);
    System.Web.HttpContext.Current.Response.Write(" SSS动态调用DLL 里的值: " + i);
      

  4.   

    saucer(思归) 
     动态调用DLL 里的值: I am Static method (method1) in class1终于取出来了。。5~~~~~~~~~谢谢阿
      

  5.   

    >>>>如果方法有返回值的怎么处理呢?????string i =(string) m.Invoke(o,null);
      

  6.   

    saucer(思归) ( ) help