Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Save()
- {
- FileStream FileStream = null;
- string FileLocation = "C:\\Users\\" + System.Environment.UserName + "\\Desktop\\SaveFile.txt";
- if (!File.Exists(FileLocation)) {
- FileStream = File.Create(FileLocation);
- }
- if (File.Exists(FileLocation)) {
- using (StreamWriter sw = new StreamWriter(FileLocation)) {
- sw.Write(textbox1.text);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement