I have a Type variable t passed into a method, and I want to use it as a generic parameter when calling IQueryable.Join like the following
queryResult.Join<Type1, Type2, t, Type3>( items, outerSelector, innerSelector, ( a, b) => a);
It obviously doesn’t work. What should I do to t in order to achieve what I intended? Thanks!
Basically you’ve got to call the method with reflection:
Type.GetMethodMakeGenericMethodpassing in your 4 type parametersIt’s a pain 🙁