Reputation: 53
I'm writing a Windows-Forms Application in which I log some Data while the program is running and I write it in a temporary file with this code:
string path = Path.GetTempFileName();
byte[] text = new UTF8Encoding(true).GetBytes("Some Text");
using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None))
{
fs.Write(text, 0, text.Length);
}
After the programm passed through I want to show/open the file in the Microsoft Editor. How can I do it. I googled around but I didn't find anything, maybe i searched with the wrong words. Hope you can help me.
Upvotes: 1
Views: 453