// ===================================================== public static string isSameGenre(Genre g1, Genre g2) { if (g1.isSameGenre(g2)) { return("Одинаковые:\n" + "g1: " + g1.Name + "\t" + g1.Math.ToString() + "\ng2: " + g2.Name + "\t" + g2.Math.ToString()); } else { return("Нет:\n" + "g1: " + g1.Name + "\t" + g1.Math.ToString() + "\ng2: " + g2.Name + "\t" + g2.Math.ToString()); } }
public static void gebugTestIsSameGenre() { Genre g1 = new Genre(null, 90); Genre g2 = new Genre("2", 90); if (g1.isSameGenre(g2)) { MessageBox.Show("Да", "Test - Genre", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Нет", "Test - Genre", MessageBoxButtons.OK, MessageBoxIcon.Information); } }