你把[DllImport("kernel32.dll")]public static extern bool Beep(int frequency, int duration);类似这样的静态方法封装一次在你类内方法调用不就完了么
用接口