4
私はLinq式を構築していて、IEnumerable.DefaultIfEmpty
(http://msdn.microsoft.com/en-us/library/bb360179.aspx)のMethodInfoを取得しようとしています。何が簡単な仕事だったように思えますが、私はそれがうまくいかない理由は断ります。Enumerable.DefaultIfEmptyのmethodinfoを取得
typeof(Enumerable).GetMethod("DefaultIfEmpty", new[] { typeof(IEnumerable<>) });
typeof(Enumerable).GetMethod("DefaultIfEmpty", new[] { typeof(IEnumerable<>).MakeGenericType(typeof(WorkitemListModel)) });
関連性はありますが、関連性はありません:http://stackoverflow.com/questions/3631547/select -right-generic-method-reflection/3632196#3632196 – LukeH
@LukeHこれは興味深い解決策でした。:) –