Linq中Func<> 的用法
- Func<string, bool> filter = delegate (string s) { return s.Length == 5;};
- Func<string, string> extract = delegate (string s) { return s; };
- Func<string, string> project = delegate (string s) { return s.ToUpper(); };
- IEnumerable<string> query = names.Where(filter).OrderBy(extract).Select(project);