コード例 #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
ファイル: Program.cs プロジェクト: Rex0070/Workspace
        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]);
        }