都可以使用
第一个using 相应的***
第二个 添加引用

解决方案 »

  1.   

    这是一个调用外部程序的例子!
    to add
    using System.Text;//StringBuilder
    using System.Runtime.InteropServices;//for the dll[DllImport("kernel32")]
    static extern int WinExec(StringBuilder lpCmdLine,int nCmdShow);StringBuilder Cmd = new StringBuilder(100,500);
    Cmd.Append("notepad");
    int handle=WinExec(Cmd,1);
      

  2.   

    using System;
    clss a
    {
    [sysimport(dll="user32.dll")]
    public static extern int MessageBoxA(int h, string m ,string c,int type);
    public static int Main()
    {
    return MessageBoxA(0,"Hello World!","Caption",0);
    }
    }
      

  3.   

    using System.Runtime.InteropServices;
    [DllImport("kernel32")]
      

  4.   

    在c#中如何使用dll里面导出的类,使用导出函数我会,怎么使用导出的类?