上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 120 下一页
摘要: 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 阅读(281) 评论(0) 推荐(0)
摘要: static void ComputeCodeLines() { string dir = @"D:\Work"; int totalLines = 0; string[] allFiles = Directory.GetFiles(dir, "*.cs", SearchOption.AllDire 阅读全文
posted @ 2020-06-17 12:14 FredGrit 阅读(122) 评论(0) 推荐(0)
摘要: using System; using System.Diagnostics; using System.IO; using System.Text; using System.Threading.Tasks; static StreamWriter Syncsw = new StreamWrite 阅读全文
posted @ 2020-06-15 12:04 FredGrit 阅读(189) 评论(0) 推荐(0)
摘要: static async void HttpClientSendAsync() { var client = new HttpClient(new HttpClientHandler { UseProxy = false }); var request = new HttpRequestMessag 阅读全文
posted @ 2020-06-09 12:03 FredGrit 阅读(1123) 评论(0) 推荐(0)
摘要: static void WebRequestDemo() { WebRequest req = WebRequest.Create("https://5b0988e595225.cdn.sohucs.com/images/20180422/bd1d3910de4945a7996eee3c1eedd0 阅读全文
posted @ 2020-06-09 10:58 FredGrit 阅读(365) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { Task task = Task.Run(() => { CreateRndTextFiles(); }); string path = Directory.GetCurrentDirectory(); FileSystemWatc 阅读全文
posted @ 2020-06-08 20:35 FredGrit 阅读(433) 评论(0) 推荐(0)
摘要: const int SupportsCompression = 0x10; const int SupportEncryption = 0x20000; [DllImport("Kernel32.dll", SetLastError = true)] extern static bool GetVo 阅读全文
posted @ 2020-06-08 18:45 FredGrit 阅读(240) 评论(0) 推荐(0)
摘要: static void FileInfoChangeReadOnly() { string file = @"D:\C\ConsoleApp24\ConsoleApp24\bin\Debug\netcoreapp3.1\ConsoleApp23\ConsoleApp23\bin\Debug\netc 阅读全文
posted @ 2020-06-08 18:21 FredGrit 阅读(167) 评论(0) 推荐(0)
摘要: static void ZipFolderDemo() { string path = Directory.GetCurrentDirectory(); string zippedFile = Path.Combine(path, path+".zip"); Console.WriteLine($" 阅读全文
posted @ 2020-06-08 17:40 FredGrit 阅读(160) 评论(0) 推荐(0)
摘要: static string dir = @"D:\C\ConsoleApp2"; static void GZipCompressDemo() { string[] filesArr = Directory.GetFiles(dir, "*", SearchOption.AllDirectories 阅读全文
posted @ 2020-06-08 15:45 FredGrit 阅读(194) 评论(0) 推荐(0)
上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 120 下一页