随笔分类 -  C#功能

摘要:代码配置编写 1、引用dll 2、代码编写配置 3、生成的目录 阅读全文
posted @ 2019-08-29 11:06 怪先生 阅读(653) 评论(0) 推荐(0)
摘要:调用dll,程序有可能缺少微软程序的运行库 可下载一个微软的运行库 下载链接:https://pan.baidu.com/s/1FSNb_eFmFoKIhU23V3zj8Q 密码:fbzy 阅读全文
posted @ 2018-04-20 00:31 怪先生 阅读(1285) 评论(0) 推荐(0)
摘要:staticvoid Main(string[] args) { string s =""; //(1)字符访问(下标访问s[i]) s ="ABCD"; Console.WriteLine(s[0]); // 输出"A"; Console.WriteLine(s.Length... 阅读全文
posted @ 2017-04-25 09:57 怪先生 阅读(160) 评论(0) 推荐(0)
摘要:var content = new StreamReader(@"D:\json.txt", Encoding.Default).ReadToEnd(); 阅读全文
posted @ 2017-04-25 09:55 怪先生 阅读(249) 评论(0) 推荐(0)
摘要:using Newtonsoft.Json.Converters; using Newtonsoft.Json; IsoDateTimeConverter timeFormat = new IsoDateTimeConverter(); timeFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; JsonConvert.SerializeObje... 阅读全文
posted @ 2017-04-25 09:53 怪先生 阅读(192) 评论(0) 推荐(0)
摘要:System.Diagnostics.Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); //执行代码+++ var d = stopwatch.Elapsed.Seconds; stopwatch.Stop(); 阅读全文
posted @ 2017-04-25 09:52 怪先生 阅读(177) 评论(0) 推荐(0)
摘要:private static char[] constant = { '0','1','2','3','4','5','6','7','8','9', 'A','B','C','D','E','F','G','H','I','J','K','L', 阅读全文
posted @ 2017-04-25 09:50 怪先生 阅读(1854) 评论(0) 推荐(0)
摘要://程序位置 string strAppFileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; System.Diagnostics.Process myNewProce... 阅读全文
posted @ 2017-03-03 10:14 怪先生 阅读(5937) 评论(1) 推荐(0)
摘要://打开配置文件 Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); //读取配置文件key的内容 string startTime = Co... 阅读全文
posted @ 2017-03-03 10:04 怪先生 阅读(499) 评论(0) 推荐(0)