Problem:

  • You need a temporary filename so you can write/read something

Solution:

  • Use System.IO.Path to create a real temporary filename for you.

Sample code:

(:source lang=C#:)
using System.IO;
...
string tempFilename = Path.GetTempFileName();

Relevant Links: