title: using a windows form, accessing a listBox and connecting it to multiple statements
body: <p>I am making a program that makes a user select the type of cookie they want with a constant price and the quantity they want; wither a 1/2 dozen , 1 dozen, 2 dozen, and 3 dozen. I am having a tough time applying my <code>listBox</code> which is named <code>Quantity</code> and its values to my if statements for each cookie pressed.  My whole if statement is red stating it cannot be applied to operands of type "double" and "void".</p>
  
  <pre><code>  public partial class Form1 : Form
  {
      private const double CHOCOLATE_CHIP = 8.98;
      private const double OATMEAL = 6.98;
      private const double VANILLA_WAFER = 6.48;
      private double price;
  
  
      public Form1()
      {
          InitializeComponent();
          this.listBox1.Items.AddRange(new object[] { 0.5, 1.0, 2.0, 3.0 });
      }
  
  
      private void close_Click(object sender, EventArgs e)
      {
          this.Close();
      }
  
      private void clear_Click(object sender, EventArgs e)
      {
          accumulated.Clear();
      }
  
      private void buy_Click(object sender, EventArgs e)
      {
  
      }
  
      private void chocolateChip_CheckedChanged(object sender, EventArgs e)
      {
          if(chocolateChip.Checked == true)
          {
              if (listBox1.SelectedItem != null)
  
                  price = CHOCOLATE_CHIP * ((double)listBox1.SelectedItem * 0.50);
  
                accumulated.Text(price.ToString));
          }
      }
  }
  }
  </code></pre>