public static void Main()
    {
        TwoGen <int, string> tgObj = new TwoGen <int, string>(1, "A");

        tgObj.showTypes();

        int v = tgObj.getT();

        Console.WriteLine("value: " + v);

        string str = tgObj.getV();

        Console.WriteLine("value: " + str);
    }
Пример #2
0
    static void Main()
    {
        TwoGen <int, string> tgObj =
            new TwoGen <int, string>(119, "Alpha Beta Gamma");

        // Show the types.
        tgObj.showTypes();
        // Obtain and show values.
        int v = tgObj.getob1();

        Console.WriteLine("value: " + v);

        string str = tgObj.GetObj2();

        Console.WriteLine("value: " + str);
    }