I'm building some Linq Expression and trying to get hold of MethodInfo for IEnumerable.DefaultIfEmpty
(http://msdn.microsoft.com/en-us/library/bb360179.aspx). What seemed to be an easy task but I'm clueless to why it's not working.
typeof(Enumerable).GetMethod("DefaultIfEmpty", new[] { typeof(IEnumerable<>) });
typeof(Enumerable).GetMethod("DefaultIfEmpty", new[] { typeof(IEnumerable<>).MakeGenericType(typeof(WorkitemListModel)) });