public void RemoveCard(CardDto card) { for (int i = 0; i < cardList.Count; i++) { if (cardList[i].name == card.name) { cardList.RemoveAt(i); } } //else //{ // throw new Exception("没有这个牌,你是咋出的?"); //} }
public void AddCard(CardDto card) { cardList.Add(card); }
/// <summary> /// 移除卡牌 /// </summary> /// <param name="card"></param> public void Remove(CardDto card) { CardList.Remove(card); }