public static void AddCustomers() { String path = @"D:\Mobile.txt"; using (StreamReader sr = File.OpenText(path)) { String s = ""; while ((s = sr.ReadLine()) != null) { Console.WriteLine(s); } } displayOperators(); try { Customer customer = new Customer(); Console.WriteLine("enter Customer name "); customer.CustomerName = Console.ReadLine(); Console.WriteLine("enter operator id "); customer.OperatorId = new MobileOperator(); customer.OperatorId.OperatorId = Convert.ToInt32(Console.ReadLine()); business.AddCustomer(customer); } catch (InValidOperatorIdException e) { Console.WriteLine("--------------------------"); Console.WriteLine(e.Message); Console.WriteLine("--------------------------"); } }