public void HandleMailSort(Plic p) { if (p.Numar != null) { //Console.WriteLine(String.Format("Good Mail Sorted with numeber {0}", p.Numar)); MailWithAdressReceived(p); } else { //Console.WriteLine("Bad mail sorted: no address"); MailWithoutAdressReceived(p); } }
private static void MailSorter_MailWithoutAdressReceived(Plic p) { Console.WriteLine(String.Format("Bad mail received--> only has the address {0}", p.Strada)); }
private static void MailSorter_MailWithAdressReceived(Plic p) { Console.WriteLine(String.Format("Mail received with good number {0}", p.Numar)); }