static void Main(string[] args) { Operation oper; oper = OperationFactory.CreateOperate("+"); oper.NumberA = 1; oper.NumberB = 2; double result = oper.GetResult(); Console.WriteLine(result); }
static void Main(string[] args) { Operation oper; oper = OperationFactory.createOperate("/"); oper.NumberA = 2; oper.NumberB = 1; double result = oper.GetResult(); Console.Write(result); Console.Read(); }