上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 120 下一页
摘要: static void Main(string[] args) { WebClientDownloadProgressChanged(); Console.ReadLine(); } static void WebClientDownloadProgressChanged() { string ur 阅读全文
posted @ 2020-07-20 11:01 FredGrit 阅读(415) 评论(0) 推荐(0)
摘要: public class NewWebClient:WebClient { protected override WebRequest GetWebRequest(Uri address) { WebRequest webRequest = base.GetWebRequest(address); 阅读全文
posted @ 2020-07-15 19:20 FredGrit 阅读(161) 评论(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 阅读(143) 评论(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 阅读(198) 评论(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 阅读(1365) 评论(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 阅读(274) 评论(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 ··· 94 95 96 97 98 99 100 101 102 ··· 120 下一页