标签:
using System.Threading;
bool createdNew; Guid ownGUID = new Guid(((GuidAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),typeof(GuidAttribute))).Value); Mutex instance = new Mutex(true, ownGUID.ToString("N"), out createdNew); if (!createdNew) { MessageBox.Show("只能运行唯一实例"); return; }
标签:
原文地址:http://www.cnblogs.com/lucika/p/5220103.html