2013年6月7日

C#的log4net、log2console、rollingfile综合配置

摘要: <?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> </configSections> <log4net> <root> <appender-ref re 阅读全文

posted @ 2013-06-07 20:17 yao2yao4 阅读(485) 评论(0) 推荐(0) 编辑

C#,字符串加密

摘要: var g = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(Encoding.UTF8.GetBytes("abc"))).Replace("-", ""); 阅读全文

posted @ 2013-06-07 19:28 yao2yao4 阅读(141) 评论(0) 推荐(0) 编辑

C# Winform 单例的Form窗体

摘要: using System.Windows.Forms;namespace WindowsFormsApplication1{ public partial class Form1 : Form { public static void ShowUI() { if (singleton == null || singleton.IsDisposed) { singleton = new Form1(); } else ... 阅读全文

posted @ 2013-06-07 19:09 yao2yao4 阅读(468) 评论(0) 推荐(0) 编辑

C#进程间的同步,实现只能运行一个程序的效果

摘要: using System;using System.Threading;using System.Windows.Forms;namespace WindowsFormsApplication1{ static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { bool createdNew; using (new Mut... 阅读全文

posted @ 2013-06-07 19:04 yao2yao4 阅读(206) 评论(0) 推荐(0) 编辑

导航