private void saveDataButton_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.AddExtension = false; sfd.Filter = "Text File (*.txt) |*.txt |Comma Separated Value File (*.csv) |*.csv"; sfd.FilterIndex = 2; if (sfd.ShowDialog() == DialogResult.OK) { string PathAndFileName = sfd.FileName; expManager.SaveDataToFile(PathAndFileName); } }