I need to save a file into special folder.
if (TextBox1.Text == s)
{ MessageBoxResult mbr = MessageBox.Show(this, "Do you want to save file?", "saved", MessageBoxButton.YesNoCancel); // if (mbr == MessageBoxResult.Yes) // { // //string path = string.Empty; // string path; // path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\abc\\File"; // if (!Directory.Exists(path)) // Directory.CreateDirectory(path); // }
It creates a folder abc if it doen't exist, i need to save s where s is a textfile.