private void BtGetNotes_Click(object sender, EventArgs e) { try { List <Note> notes = server.GetNote(); string result = ""; foreach (Note note in notes) { result += note.Id + ": " + note.Title + "\n"; } MessageBox.Show(result, "Result"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } }