To add to what Maciej has shown you here:
There are several ways to create a "blank" File can be created in C#:
1.
File.Create(pathName);
Since leaving the File open is often not desired:
using (File.Create(pathName))
using (File.Create(pathName)) {}
File.Create(pathName).Close();
File.Create(pathName).Dispose();
2. To write content to a file, with the file automatically created if it does not exist:
See Maciej's answer here ... and ... study the various "Writers" available in the System.IO library: TextWriter, XmlWriter, as well as StreamWriter.
File.WriteAllText(pathName, String.Empty);
File.CreateText(pathName).Close();
Since you may want to do something differently if a File already exists, this is a typical code pattern:
if (File.Exists(pathName))
{
}
else
{
}