/// <summary> /// 根据名字查找候选人 /// </summary> /// <param name="name">名字</param> /// <returns></returns> public static Candidate FindCandidateByName(string name) { if (Candidates == null || Candidates.Count == 0) { return(null); } return(Candidates.Find(c => { return c.Name.Equals(name); })); }