You are not getting any content written to the file because you are never writing to it.
Also, I suggest you study the 'using statement to wrap file operations: [
^] so temporary file objects are efficiently disposed of.
I suggest you use a StreamWriter here since you are writing text to a file:
string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
saveFileDialog1.InitialDirectory = filePath;
saveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 1;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
using (StreamWriter theFile = new StreamWriter(saveFileDialog1.FileName))
{
theFile.Write(sb.ToString());
}
}