/// <summary> /// 根据昵称或者id查找好友 /// </summary> FriendInfo FindFriendByNameOrId(string value) { FriendInfo info = null; if (friendRankInfos.Count == 0) { return(info); } info = friendRankInfos.Find(p => p.nickname == value); if (info == null && GameTool.iNum(value)) { info = friendRankInfos.Find(p => p.userId == int.Parse(value)); } return(info); }