摘要:
public static IEnumerable<T> GetControls<T>(this Control control, Func<T, bool> filter) where T : Control { foreach (Control c in control.Controls) { if (c is T && (filter == null || filter(c as T))) { yield return c as T; } foreach (T _t in GetControls<T>(c, filter)) 阅读全文
posted @ 2011-07-20 09:44 codingsilence 阅读(240) 评论(0) 推荐(0) 编辑