using System;
class MyGenericClass {
T ob;
public MyGenericClass(T o) {
ob = o;
}
public T getob() {
return ob;
}
public void showType() {
Console.WriteLine("Type of T is " + typeof(T));
}
}
public class Test {
public static void Main() {
MyGenericClass iOb;
iOb = new MyGenericClass(102);
iOb.showType();
int v = iOb.getob();
Console.WriteLine("value: " + v);
MyGenericClass strOb = new MyGenericClass("Generics add power.");
strOb.showType();
string str = strOb.getob();
Console.WriteLine("value: " + str);
}
}