This may sound stupid but I cannot get the MethodInfo
of Queryable.Join(...)
. I want to get it because of How to use a Type variable in a generic method call (C#)
It has 2 available method signatures and I want to get the one without IEqualityComparer, so I need to specify Type[]
in GetMethod
.
I wrote something like
MethodInfo joinMethod = typeof( Queryable ).GetMethod( "Join", new Type[] { typeof(IEnumerable<>), typeof(Expression<Func<>>), typeof(Expression<Func<>>), typeof(Expression<Func<>>)});
but it doesn't work. I'm unable to specify the types in generics above, because they are passed as Type
from outside (and this is why I need this reflection).
Can anyone tell me how? Thanks!