// button function which opens file dialog, and loads csv into game public void LoadCsvFromFile() { DialogResult result = OpenDialog.ShowDialog(); if (result == DialogResult.OK) { string file = OpenDialog.FileName; try { string contents = File.ReadAllText(file); originalBoard = File.ReadAllText(file); TheSudoku.FromCSV(contents); } catch (IOException) { } } }