public void LoadCallingList(string inputCalling) { var listOfCalls = inputCalling .Split(new[] { ' ' }) .ToList(); foreach (var phoneNumber in listOfCalls) { try { var validNumber = new Calling(phoneNumber); Console.WriteLine(this.PrintCall(validNumber)); } catch (Exception ex) { Console.WriteLine(ex.Message); } } }
public void LoadCallingList(string inputCalling) { var listOfCalls = inputCalling .Split(new[] { ' ' }) .ToList(); foreach (var phoneNumber in listOfCalls) { //try //{ var validNumber = new Calling(phoneNumber); //Console.WriteLine(this.PrintCall(validNumber)); callings.Add(validNumber); //} //catch (Exception ex) //{ // callings.Add(ex.Message); // Console.WriteLine(ex.Message); //} } }
public string PrintCall(Calling newCall) { return(newCall.Call()); }