Beispiel #1
0
        // 코드 6-6: Main() 메서드는 클래스 메서드
        static void Main(string[] args)
        {
            // 코드 6-2 호출
            TestA testA = new TestA();

            Console.WriteLine(testA.Multi(52, 273));
            Console.WriteLine(testA.Multi(103, 32));
            Console.WriteLine();

            // 코드 6-3 호출
            TestB testB = new TestB();

            testB.Print();
            testB.Print();
            testB.Print();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //1. Instanse Method

/*
 *          TestA testA = new TestA();
 *          WriteLine(testA.Multi(52, 273));
 *          WriteLine(testA.Multi(103, 32));
 */

            //Class Method
            WriteLine(TestA.Multi(52, 273));
            WriteLine(TestA.Multi(103, 32));


            TestB testB = new TestB();

            testB.Print();
        }