泛型 错误 无法将类型 “class1” 转换为“class1”
ghao0 2012-04-18 03:39:40 我的函数
public void Myfunction(class1<typeBase> 参数)
{
...
}
希望传入参数的类型class1<type1>
type1继承于typeBase
如何做到?
如果直接传会报错!
class1<type1> 参数1;
....
Myfunction(参数1);
编译报错
泛型 错误 无法将类型 “class1<type1>” 转换为“class1<typeBase>”