예제 #1
0
        static void Main(string[] args)
        {
            Array_int a1 = new Array_int();

            a1[0] = 100;

            Array_Generic <int> g1 = new Array_Generic <int>();

            g1[0] = 100;

            Array_Generic <double> g2 = new Array_Generic <double>();

            g2[0] = 100;
        }
예제 #2
0
        static void Main(string[] args)
        {
            Array_int arr1 = new Array_int();

            arr1[0] = 100;
            Console.WriteLine(arr1[0]);

            Array_double arr2 = new Array_double();

            arr2[0] = 3.14;
            Console.WriteLine(arr2[0]);

            Array_generic <int> arr3 = new Array_generic <int>();

            arr3[0] = 100;
            Console.WriteLine(arr3[0]);

            Array_generic <string> arr4 = new Array_generic <string>();

            arr4[0] = "Generic Class";
            Console.WriteLine(arr4[0]);
        }
예제 #3
0
        static void Main(string[] args)
        {
            Array_int arr1 = new Array_int();

            arr1[0] = 100;
            Console.WriteLine(arr1[0]);

            Array_double arr2 = new Array_double();

            arr2[0] = 3.14;
            Console.WriteLine(arr2[0]);

            Array_Generic <int> intArr = new Array_Generic <int>();

            intArr[0] = 100;
            Console.WriteLine(intArr[0]);

            Array_Generic <double> doubleArr = new Array_Generic <double>();

            doubleArr[0] = 3.14;
            Console.WriteLine(doubleArr[0]);
        }