internal void Question1() { if (!TryParseInput()) { MessageBox.Show("Can't parse"); return; } var sb = new StringBuilder(); int nbValidMessages = 0; foreach (var message in m_messages) { if (m_system.CheckMessage(message, 0)) { sb.AppendLine(message.Text); nbValidMessages++; } } sb.Append($"Number of valid messages: {nbValidMessages}"); Result.Text = sb.ToString(); }