ms提供的扩展方法是不是有些不完善(好多我没用过,但是想找个用的也挺烦),像下面这样的方法ms已经有了吗? 如果有了叫什么
public static IEnumerable<T> Filter<T>(this IEnumerable<T> source, Func<T, bool> predicate)
{
foreach (var s in source)
if(predicate(s))
yield return s;
}
慕田峪9158850
天涯尽头无女友
随时随地看视频慕课网APP