コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }