static void Main(string[] args) { Ifactory operFactory = new AddFactory(); Operation oper = operFactory.CreateOperation(); oper.NumberA = 1; oper.NumberB = 2; double result = oper.GetResult(); }
static void Main(string[] args) { IFactory factory = new AddFactory(); Operation oper = factory.CreateOperation(); oper.NumberA = 1; oper.NumberB = 2; double result = oper.GetResult(); Console.WriteLine(result); Console.ReadKey(); }