private void Form1_Load(object sender, EventArgs e) { List <Card> Cards = new List <Card>(); Deck.FillDeck(Cards); var query = from card in Cards select card.Name; listBox1.DataSource = query.ToList(); }
private void button2_Click(object sender, EventArgs e) { List <Card> Cards = new List <Card>(); Deck.FillDeck(Cards); Cards.ShuffleDeck(); var query = from card in Cards select card.Name; listBox1.DataSource = query.ToList(); }