public static int Input(string sa, string sb, string operation) { int a, b; char o; int res = 0; try { a = Convert.ToInt32(sa); b = Convert.ToInt32(sb); o = Convert.ToChar(operation); res = CountPHPServer.CalculationRequest(a, b, operation); } catch (Exception) { throw new ArgumentException(); } return(res); }
public static int Input(string s) { string[] str = s.Split(' '); int a, b; char o; int res = 0; try { a = Convert.ToInt32(str[0]); b = Convert.ToInt32(str[2]); o = Convert.ToChar(str[1]); res = CountPHPServer.CalculationRequest(a, b, str[1]); } catch (Exception) { throw new ArgumentException(); } return(res); }