예제 #1
0
        static void Main(string[] args)
        {
            var calc4 = new Calculator4();

            calc4.GetNumber("First"); calc4.GetNumber("Second");

            calc4.AddNumbers();

            PrintResult(calc4);

            Console.ReadKey();
        }
예제 #2
0
 static void PrintResult(Calculator4 calc)
 {
     //Console.WriteLine($"Your result is {result}.");
     Console.WriteLine(String.Format("Your result is {0}.", calc.Result));
 }