Stream myStream;
myStream = File.Open(SetupFilePath, FileMode.OpenOrCreate); //Open or Create
myStream.Close();
myStream = File.Open(SetupFilePath, FileMode.Truncate); //Reopen and clear all the text
StreamWriter sw = new StreamWriter(myStream, System.Text.Encoding.Unicode);
sw.WriteLine("test");
沒有留言:
張貼留言