上一页 1 ··· 97 98 99 100 101 102 103 104 105 ··· 123 下一页
摘要: public class NewWebClient:WebClient { protected override WebRequest GetWebRequest(Uri address) { WebRequest webRequest = base.GetWebRequest(address); 阅读全文
posted @ 2020-07-15 19:20 FredGrit 阅读(163) 评论(0) 推荐(0)
摘要: static void AnonymousSerializeDemo() { var data = new { firstPart = new { item1 = "item1", item2 = "item2", item3 = 10 }, secondPart = new { pp1 = new 阅读全文
posted @ 2020-07-09 19:54 FredGrit 阅读(147) 评论(0) 推荐(0)
摘要: class Dirs { public string DirName { get; set; } public long DirSize { get; set; } } static void OrderFiles(string dir) { string[] dirs = Directory.Ge 阅读全文
posted @ 2020-06-30 11:04 FredGrit 阅读(199) 评论(0) 推荐(0)
摘要: The piped stream are bidirectional communcation.Meanwhile they can read and write. Write the NamedPipeServerStream and NamedPipeClientStream in two di 阅读全文
posted @ 2020-06-29 17:56 FredGrit 阅读(1372) 评论(0) 推荐(0)
摘要: static DataTable ReadExcelConvertToDataTable(string xlsxFileName) { DataTable dt = new DataTable(); try { IWorkbook book; using (FileStream fs = new F 阅读全文
posted @ 2020-06-26 19:51 FredGrit 阅读(141) 评论(0) 推荐(0)
摘要: 1.Install-package npoi; 2.Add necessary namespace as below. using System.IO;using System.IO.Compression;using NPOI.HSSF.UserModel;using NPOI.SS.UserMo 阅读全文
posted @ 2020-06-26 18:33 FredGrit 阅读(275) 评论(0) 推荐(0)
摘要: Write the current to the local file. static void CopyStream(Stream stream, string destPath) { using (var fileStream = new FileStream(destPath, FileMod 阅读全文
posted @ 2020-06-26 18:14 FredGrit 阅读(189) 评论(0) 推荐(0)
摘要: static void AssemblyLoadContextDemo() { var assms = AssemblyLoadContext.All.SelectMany(x => x.Assemblies); if(assms!=null && assms.Any()) { foreach(va 阅读全文
posted @ 2020-06-22 15:52 FredGrit 阅读(193) 评论(0) 推荐(0)
摘要: 1.Add resource file Resource1.resx via add new item in Console Application project; 2.Open Resource1.resx, Add Resource/Add Existing File, add multipl 阅读全文
posted @ 2020-06-19 16:49 FredGrit 阅读(253) 评论(0) 推荐(0)
摘要: 1.Add new folder Resources in project; 2.Add resource such as picture in the Resource folder; 3.Set the picture's Build Action as Embedded Resource in 阅读全文
posted @ 2020-06-17 18:16 FredGrit 阅读(283) 评论(0) 推荐(0)
上一页 1 ··· 97 98 99 100 101 102 103 104 105 ··· 123 下一页