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); }
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); }