private void Add() { double first; double second; if (double.TryParse(FirstNumber, out first) == true && double.TryParse(SecondNumber, out second) == true) { SumResult = _mathService.AddNumbers(new List <double> { first, second }).ToString(); } else { SumResult = "NaN"; } }