C#字节byte类型读取与写入
//创建文件 //File.Create(@"D:\a.txt"); //Console.WriteLine("创建成功"); ////删除文件 //File.Delete(@"D:\a.txt"); //Console.WriteLine("删除成功"); //string st1 = "今天天气好晴朗,处处好风光"; //byte[] bt = Encoding.Default.GetBytes(st1); //File.WriteAllBytes(@"D:\a.txt", bt); //byte[] str=File.ReadAllBytes(@"D:\a.txt"); //string strr = Encoding.GetEncoding("utf-8").GetString(str); // File.WriteAllLines(@"D:\a.txt", new string[] { "123123", "的是的发", "asd3dasd2222" }); //Console.WriteLine(strr);