标签:str c# class span stream txt none info exist
string path = System.IO.Directory.GetCurrentDirectory();//相对路径 FileInfo fi = new FileInfo(path + @"\Data\unity.txt"); ////如果该文件存在需要删除重新写入 if (fi.Exists) { fi.Delete(); }
StreamWriter sw = new StreamWriter(path + @"\Data\StreamingAssets\unity.txt");
sw.WriteLine(需要写入的内容方法);
sw.Close();
MessageBox.Show("写入成功! ^-^ ", "TaoHu", MessageBoxButtons.OK, MessageBoxIcon.None);
标签:str c# class span stream txt none info exist
原文地址:http://www.cnblogs.com/htwzl/p/7351824.html