/// <summary> /// 查找乘客信息 /// </summary> /// <param name="name">乘客名称</param> /// <returns>Passenger</returns> public static Passenger GetPassengerByName(string name) { return PassengerArry.Find(delegate(Passenger p) { return p.Passenger_name == name; }); } /// <summary> /// 查找乘客信息 /// </summary> /// <param name="name">乘客名称</param> /// <returns>Passenger</returns> public static Passenger GetPassengerByName(string idCard) { return PassengerArry.Find((p) => { return p.PassengerIdNo == idCard; }); }
时间: 2024-10-01 10:03:18