using System;
class NonGen {
int num;
public NonGen(int i) {
num = i;
}
public int getnum() {
return num;
}
}
class Gen<T> : NonGen {
T ob;
public Gen(T o, int i) : base (i) {
ob = o;
}
public T getob() {
return ob;
}
}
class MainClass {
public static void Main() {
Gen<String> w = new Gen<String>("Hello", 4);
Console.Write(w.getob() + " ");
Console.WriteLine(w.getnum());
}
}
|