private void button_speichern_Click(object sender, EventArgs e) { try { Ersteller Ersteller = new Ersteller(); Ersteller.SetName(textBox_ersteller_name.Text); Ersteller.SetKuerzel(textBox_ersteller_kuerzel.Text); Ersteller.SetEmail(textBox_ersteller_email.Text); var content = JsonConvert.SerializeObject(Ersteller); File.AppendAllText(Repository.erstellerFilePath, content); File.AppendAllText(Repository.erstellerFilePath, "\n"); MessageBox.Show("Gespeichert!"); } catch (Exception) { MessageBox.Show("Fehler: Ersteller Konnte nicht gespeichert werden!"); throw; } }