摘要: StringBuilder MailLog = new StringBuilder(); string logPath = txtFile + str + DateTime.Now.ToString("yyyyMMdd") + ".txt"; Write(logPath, Context.DateF 阅读全文
posted @ 2016-11-21 17:39 菜鸟Only 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 对象序列化: /// <summary> /// 将一个对象序列化为XML字符串 /// </summary> /// <param name="o">要序列化的对象</param> /// <param name="encoding">编码方式</param> /// <returns>序列化产生 阅读全文
posted @ 2016-11-21 17:30 菜鸟Only 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 本方法引用 Aspose.Cells.dll,ICSharpCode.SharpZipLib.dll ,NPOI.dll,NPOI.OOXML.dll,NPOI.OpenXml4Net.dll,NPOI.OpenXmlFormats.dll static void Main(string[] arg 阅读全文
posted @ 2016-11-21 17:26 菜鸟Only 阅读(910) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { var arr = new int[] { 2, 8, 5, 1, 9, 9, 7, 7, 25, 35, 20 }; Sort1(arr); foreach (var item in arr) { Console.WriteLin 阅读全文
posted @ 2016-11-21 17:14 菜鸟Only 阅读(584) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { YtRequest<RequestHead, RequestBody> Ytrequest = new YtRequest<RequestHead, RequestBody> { head = new RequestHead { v 阅读全文
posted @ 2016-11-21 17:09 菜鸟Only 阅读(177) 评论(0) 推荐(0) 编辑
摘要: <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> </configSections> <log4ne 阅读全文
posted @ 2016-11-21 17:06 菜鸟Only 阅读(149) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { Console.WriteLine(foo(30)); Console.ReadKey(); } public static int foo(int i) { if (i <= 0) { return 0; } else if (i 阅读全文
posted @ 2016-11-21 17:01 菜鸟Only 阅读(280) 评论(0) 推荐(0) 编辑