title: VB.net - Adding to an ArrayList
body: <p>This is my first time using <code>ArrayList</code>. I have tried to add to <code>BarcodeArray</code> (<em>as an arraylist</em>) and execution is failing with the error message: </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>My code is shown below:</p>
  
  <pre><code>'Populate the arrays        
  BarcodeArray.Add(txt_Barcode.Text)
  CategoryArray.Add(cmb_Categories.Text)
  TitleArray.Add(txt_Title.Text)
  DescriptionArray.Add(txt_Description.Text)
  QuantityArray.Add(txt_Quantity.Text)
  RRPArray.Add(txt_RRP.Text)
  CostArray.Add(txt_Cost.Text)
  </code></pre>
  
  <p>This message appears when <strong>line 2</strong> is executed. How do I add text to an ArrayList from a textbox without getting this error?</p>