error is related to foreach in c# :     using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Collections.Generic;
    //using System.store.cs;
    namespace _2ndprojecttry
    {
        public partial class Form1 : Form
        {
             store store = new store();
            public List<item> insert= new List<item>();//this is the list of second list items
    
    
            BindingSource itemslist = new BindingSource();
            BindingSource selectitem2 = new BindingSource();
            public Form1()
            {
                InitializeComponent();
                setupdata();
                itemslist.DataSource = store.items;
                item.DataSource = itemslist;//linked between the two
                // what to print inside
                item.DisplayMember = "Display";
                item.ValueMember = "Display";
                //put the data to the selected item list
                selectitem2.DataSource=insert;
                selected_item.DataSource = selectitem2;
    
                selected_item.DisplayMember = "Display";
                selected_item.ValueMember = "Display";
    
            }
    
            private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
            {
                
            }
    
            public void setupdata()
            {
    
                store.vendors.Add(new vendor { firstname = "keshava",
                                                lastname = "shourie",
                                                commission = 0.5M });/* making keshava 
                                                                                                         * shourie as vendor 1*/
                store.vendors.Add(new vendor { firstname = "varun", 
                                                lastname = "sharath",
                                                commission = 0.5M });
                
                //adding the lsit to the store
    
                store.items.Add(new item {owner="harsha Bhogle",
                                            title="sachin hero",
                                            paymentdiscription=true,
                                            price=5.0M,
                                          //  sold=false,
                                            discription="about sachin"});
    
                store.items.Add(new item
                {
                    owner = "Arun Shourie",
                    title = "Democratic nation",
                    paymentdiscription = true,
                    price = 6.0M,
                    //  sold=false,
                    discription = "about sachin"
                });
    
                //stores name
                store.name = "shourie's shop";
            }
    
            private void cart_Click(object sender, EventArgs e)
            {
                //put the data to the selected item list
                item selected = (item)item.SelectedItem;
                insert.Add(selected);
                selectitem2.ResetBindings(false);
              //  MessageBox.Show(selected.title);
                
            }
          
            private void purchase_Click(object sender, EventArgs e)
            {
                foreach (item item in selected_item)
                {
                    
                }
            }
        }
    }
I am getting an error related to foreach which states as,since i am not getting what to do with this error please suggest the changes to be made to improve and correct the error in the code.
Foreach statement cannot operate on type ' ' because it does not contain a public definition for 'GetEnumerator'.so please tell me what to implement so that i could get error freed code.



