I'm developing a WPF game with C# and .NET Framework 4.5.1.
I have this class:
public class Player
{
public Card[4] Hand { get; set; }
}
And I need to set that Player.Hand can only contain four cards (Card is a class that represent a card).
How can I do it? The above code show the exception "matrix size cannot be specified in variable declaration". And if I use List<Card>(), I can set max size.