首页 > 编程语言 >C# 单例

C# 单例

时间:2023-02-27 09:36:41浏览次数:28  
标签:Process Run C# Application 单例 Main

[STAThread]
		private static void Main()
		{
			if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
			{
				Environment.Exit(1);
			}
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.Run(new Form2());
		}

 

标签:Process,Run,C#,Application,单例,Main
From: https://www.cnblogs.com/guangzhiruijie/p/17158556.html

相关文章