Create a text file in windows application
I want to open a text file and write some data to the file. Here is my code:
FileStream fs1 = new FileStream("D:\\Yourfile.txt",
FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter writer = new StreamWriter(fs1);
writer.Write("Hello");
writer.Close();
System.Diagnostics.Process.Start(@"D:\\Yourfile.txt");
This code works fine.But here first the file is getting saved. I want a
text file to open along with the data and let the user save the text file.
Is it possible?
No comments:
Post a Comment