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
2018-12-07 01:24:44