var runPeakWidths = runAnalysis.PassAnalyses.SelectMany(ipa => BuildPeakWidths(ipa));
You can also use this if you want:
var runPeakWidths = runAnalysis.PassAnalyses.SelectMany<Ipa, Pw>(BuildPeakWidths);
where Ipa- type Ipa
and Pw- type PeakWidth.
I was reliably informed (I have not confirmed myself yet) that the return-type method for method groups is now implemented in the compiler, so this should work in C # 4:
var runPeakWidths = runAnalysis.PassAnalyses.SelectMany(BuildPeakWidths);
source
share