using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; namespace ai_proofread_client { internal static class Program { [DllImport("kernel32.dll")] public static extern bool AllocConsole(); [DllImport("kernel32.dll")] static extern bool FreeConsole(); /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { // 允许调用控制台输出 AllocConsole(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); Console.WriteLine("xxx-->0"); Debug.WriteLine("xxx-->1"); Console.WriteLine(string.Join("\n",args)); Console.ReadLine(); // 释放 FreeConsole(); } } }