Getting common methods is a pain, to be honest. I do not know a better way than using:
var method = typeof(Enumerable).GetMethods() .Where(m => m.Name == "DefaultIfEmpty") .Where(m => m.GetParameters().Length == 1) .Single();
To call GetMethod , you will need to have the exact correct type of the parameter, including the parameter of the correct type for the parameter. As soon as you get it, as soon as you can do it, but until then I think that all this is available :(
source share