public class C
{
public T F<T, U>(U x, int y)
{
return default(T);
}
public void Test()
{
string x = F(1, 2); // (1)
}
}
(1) Strange error message is shown here. It says that 'argument type 'int' is not assignable to parameter type U'. But problem is that type parameter T can't be infered.