是否可以U
为函数返回值使用不同的通用参数类型(),而T
对于本地参数已经有另一种通用参数类型?
我努力了:
private static U someMethod <T,U>(T type1, Stream s)
和
private static U someMethod <T><U>(T type1, Stream s)
编辑: 我们同意尝试:
private static U someMethod <T,U>(T type1, Stream s)
public static T someMethodParent<T>(Stream stream)
{
U something = someMethod(type1, stream);
...
}