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