specify file name and path in streamwriter
I want to create a new notepad file and specifiy file location and name i have: i'm getting an error that says empty path name is illegal
SaveFileDialog saveFile = new SaveFileDialog();
string filePath = saveFile.FileName;
StringBuilder sb = new StringBuilder();
if (saveFile.ShowDialog() == DialogResult.OK)
{
... assign data to string
}
StreamWriter sw = new StreamWriter(filePath);
sw.WriteLine(sb);
sw.Close();