private void serializeThreeOfClubs_Click(object sender, EventArgs e)
        {
            Card threeClubs = new Card(Suits.Clubs, Values.Three);

            using (Stream output = File.Create(fileThreeClubs))
            {
                BinaryFormatter bf = new BinaryFormatter();
                bf.Serialize(output, threeClubs);
            }
        }
Exemple #2
0
 public void Add(Card cardToAdd)
 {
     cards.Add(cardToAdd);
 }
        private void serializeSixOfHearts_Click(object sender, EventArgs e)
        {
            Card sixHearts = new Card(Suits.Hearts, Values.Six);

            using (Stream output = File.Create(fileSixHearts))
            {
                BinaryFormatter bf = new BinaryFormatter();
                bf.Serialize(output, sixHearts);
            }
        }