private void buttonWriteTestData_Click(object sender, EventArgs e) { var settingsFile = new XmlSettingsFile("TestSettings"); try { settingsFile.TestWrite(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }