List.Find 方法

if (string.IsNullOrEmpty(driverList.Find(CheckDriver)))
                {
                    sMessageBox.Warm("驾驶员不存在");
                    return false;
                }
bool CheckDriver(string s)
        {
            if (s.IndexOf(comCompayDriver.Text.Trim()) > -1)
            {
                return true;
            }
            return false;
        }
posted @ 2012-04-12 09:21  popoxxll  阅读(241)  评论(0编辑  收藏  举报