代码
using System;
class A<T>{
T mb = default(T);
public void set(T t){
mb = t;
}
public T get(){
return mb;
}
}
class B{
public int a = 5;
}
public class Fanxing{
public static void Main(){
Console.WriteLine("hello word");
B b = new B();
A<B> ab = new A<B>();
ab.set(b);
B b2 = ab.get();
Console.WriteLine(b2.a);
}
}