private IndividualCardModel FindCardInCollection(Guid guidOfCardToFind) { IndividualCardModel cardToFind = null; foreach (IndividualCardModel card in FlashcardCollection) { if (card.CardID.Equals(guidOfCardToFind)) { cardToFind = card; break; } } if (cardToFind == null) { throw new ArgumentException(string.Format("Could not find card {0} in set", guidOfCardToFind)); } return(cardToFind); }
public void RemoveCardFromSet(IndividualCardModel cardToRemove) { FlashcardCollection.Remove(cardToRemove); }