2020年4月17日
摘要: 1.日志记录Log.cs public class Log { private string Event { get; set; } private DateTime Time { get; set; } /// <summary> /// 日志记录,写入文件 /// </summary> /// 阅读全文
posted @ 2020-04-17 14:56 RookieBoy666 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 如下: if (!File.Exists(@"D:\MyFile.txt")) { FileStream fs = new FileStream(@"D:\MyFile.txt", FileMode.Create, FileAccess.Write); } else { using (FileStr 阅读全文
posted @ 2020-04-17 14:25 RookieBoy666 阅读(775) 评论(0) 推荐(0) 编辑
摘要: App.config中: <appSettings> <add key="connectionstring" value="Data Source=127.0.0.1;Initial Catalog=DatabaseName;Persist Security Info=True; User ID=s 阅读全文
posted @ 2020-04-17 13:27 RookieBoy666 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 例如: string str=“你好”; WriteEncodeString(str, "Config.txt");//bin/debug文件夹下会生成Config.txt文件,里面包含str内容 public static void WriteEncodeString(string str,str 阅读全文
posted @ 2020-04-17 13:21 RookieBoy666 阅读(2326) 评论(0) 推荐(0) 编辑
摘要: 参照网友的教程 加密: //加密 public static string Encode(string encryptString) { try { string KEY = "zjp1202!"; byte[] _vector = { 0x12, 0x34, 0x56, 0x78, 0x90, 0 阅读全文
posted @ 2020-04-17 13:13 RookieBoy666 阅读(702) 评论(0) 推荐(0) 编辑