Example #1
0
    static void Main()
    {
        // Create a Gen2 object for string and int.
        Gen2 <string, int> x = new Gen2 <string, int>("Value is: ", 99);

        Console.Write(x.GetOb());
        Console.WriteLine(x.GetObj2());
    }
Example #2
0
    public static void TestMain()
    {
        Gen4 <A, B> ab = new Gen4 <A, B>();
        Gen4 <A, A> aa = new Gen4 <A, A>();

        XY <int>    xy  = new XY <int>(11, 22);
        XY <double> xyD = new XY <double>(3.4, 4.3);

        System.Console.WriteLine(xy.x + " " + xy.y);
        System.Console.WriteLine(xyD.x + " " + xyD.y);

        Gen2 <string, int> gen2 = new Gen2 <string, int>("New value: ", 99);

        System.Console.WriteLine(gen2.GetObj() + " " + gen2.GetObj2());
    }