Assembly assem = AppDomain.CurrentDomain.Load("DllOutput");
Type t = assem.GetType("DllOutput.DllOutput");
object objInstance = System.Activator.CreateInstance(t);
MethodInfo[] methods = t.GetMethods();
foreach(MethodInfo method in methods)
{
this.listBox1.Items.Add(method.Name);
}感觉用反射作不难(难道我理解错了?),举个小例子DllOutput.dll在本机的debug的bin目录下

解决方案 »

  1.   

    "DllOutput.DllOutput"
    是namespace + classname
      

  2.   

    不明白你的意思,.NET应该自己就可以列出来的,要不就是使用///注释来处理
      

  3.   

    无语中。微软怎么做的我不知道。
    但在C#中可以实现这种功能,用datatable举个例子
    DataTable dtTable = new DataTable();
    Type t = dtTable.GetType();
    MethodInfo[] methods = t.GetMethods();//得到dtTable所有的方法
    foreach(MethodInfo method in methods)
    {
      this.listBox1.Items.Add(method.Name);//显示方法名
    }
    然后具体怎么用"."把方法名显示出来。俺就不清楚了(运算符的重载?)
    -________________-b
      

  4.   

    用类似System.Reflection.Assembly.LoadFrom(string assemblyFile);的方法来加载DLL类型库,然后用GetTypes得到所有类型,用type.GetMembers()/type.GetMethods()/type.GetEvents()等得到类型里的方法属性等数据类型的信息.然后入到一块内存区域以供使用.
      

  5.   

    To:hbxtlhx(最后一片绿叶) 
    多少明白了一点
    揭帖了