I would like to know if there is a shorter hand of doing what I have done :
public bool IsDeckUnique()
{
foreach (Card card1 in DeckOfCards)
{
foreach (Card card2 in DeckOfCards)
{
if (card1.Equals(card2))
{
return false;
}
}
}
return true;
}
The .Equals just checks if the suit and value of a card is the same if so returns true. I basically want to know if there is a form of way to shorten down the 2 foreach statments, thank you