public void CallTwoArg() { var x = new GenericTwoArgType <string, int>("X", 1); var obj = GenericUtils.Call(typeof(GenericUtilsTest), "GenericMethodTwoArg", typeof(GenericTwoArgType <,>), x); Assert.IsType(typeof(GenericTwoArgType <string, int>), obj); var y = (GenericTwoArgType <string, int>)obj; Assert.Equal(x.A, y.A); Assert.Equal(x.B, y.B); }
public static GenericTwoArgType <TA, TB> GenericMethodTwoArg <TA, TB>(GenericTwoArgType <TA, TB> a) { return(a); }