private void save_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog() == DialogResult.OK) { try { ToolsFile toolsFile = new ToolsFile(saveFileDialog.FileName); toolsFile.WriteArr2(DataGridViewUtils.GridToArray2 <string>(Input)); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } } }
static void FileWriteArr2(string[,] Arr2, string Path) { ToolsFile file = new ToolsFile(Path); file.WriteArr2(Arr2); }