01 2020 档案

摘要:public static class StringHelper { public static bool IsCapitalized(this string str) { if(string.IsNullOrWhiteSpace(str)) { return false; } return cha 阅读全文
posted @ 2020-01-28 21:22 FredGrit 阅读(406) 评论(0) 推荐(1) 编辑
摘要:static void AggregateExceptionsDemo() { var task1 = Task.Factory.StartNew(() => { var child1 = Task.Factory.StartNew(() => { throw new CustomException 阅读全文
posted @ 2020-01-19 23:38 FredGrit 阅读(300) 评论(0) 推荐(0) 编辑
摘要:Below is applicable for ConsoleApplication 1.Install-package MouseKeyHook 2. using Gma.System.MouseKeyHook; using System; namespace ConsoleApp1 { publ 阅读全文
posted @ 2020-01-15 17:26 FredGrit 阅读(621) 评论(1) 推荐(0) 编辑
摘要:using System; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Diagnostics; namespace ConsoleApplication3 { class Monito 阅读全文
posted @ 2020-01-15 11:23 FredGrit 阅读(499) 评论(0) 推荐(0) 编辑
摘要:1 static DataTable ConvertJsonToTable(string jsonValue) 2 { 3 DataTable dt = (DataTable)JsonConvert.DeserializeObject(jsonValue, typeof(DataTable)); 4 阅读全文
posted @ 2020-01-14 18:18 FredGrit 阅读(423) 评论(0) 推荐(0) 编辑
摘要:1.Git Delete remote branch git push origin --delete remoteBranchName eg:git push origin --delete MyFirstRemoteBranch 2.Generate pub key. ssh-keygen -t 阅读全文
posted @ 2020-01-13 11:14 FredGrit 阅读(342) 评论(0) 推荐(0) 编辑
摘要:using System.IO; using System.Diagnostics; static void Main(string[] args) { CmdDemo("dir"); Console.ReadLine(); } static void CmdDemo(string cmdText) { var proc = new Process { StartInfo = new Proces 阅读全文
posted @ 2020-01-06 11:16 FredGrit 阅读(272) 评论(0) 推荐(0) 编辑
摘要:static void Main(string[] args) { string[] enumNames = GetEnumNames(typeof(Seasons)); if(enumNames!=null && enumNames.Any()) { foreach(var name in enumNames) { Console.WriteLine(name); } } Console.Wri 阅读全文
posted @ 2020-01-03 14:59 FredGrit 阅读(272) 评论(0) 推荐(0) 编辑
摘要:1.install-package log4net 2.add new config file, its name is log4net.config <?xml version="1.0" encoding="utf-8" ?><configuration> <log4net> <root> <l 阅读全文
posted @ 2020-01-03 11:29 FredGrit 阅读(380) 评论(0) 推荐(0) 编辑
摘要:I had validated that different encoding mode can generate different result,they are not identical. Besides,the File.ReadAllBytes may based on UTF8 bec 阅读全文
posted @ 2020-01-01 21:17 FredGrit 阅读(250) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示