コード例 #1
0
        static void Main(string[] args)
        {
            Person Rita = new Person {
                Name = "Rita", age = 26
            };

            Console.WriteLine(Rita.age);
            Console.WriteLine(IsAdult(baseAge: 18, age: 26));

            // Static Method in myClass

            for (int i = 0; i < 10; i++)
            {
                myClass my = myClass.Factory(i, i * 2);
                my.Show();
            }

            // Static Class

            Console.WriteLine(Numeric.Num(34.88));
            Console.WriteLine(Numeric.Part(34.88));
            Console.WriteLine(Numeric.IsEven(34.88));
            Console.WriteLine(Numeric.IsOdd(34.88));


            Console.ReadKey();
        }