title: c# list<t>; how to add objects like a foreach loop but without foreach?
body: <p>I'm new to c# and need help with lists and objects. </p>
  
  <p>Severe edit as suggested..</p>
  
  <p>what I really want to do is</p>
  
  <pre><code>List&lt;Item&gt; MyList = new List&lt;Item&gt;();
  
  Item MyItem = new Item();
  
  MyItem.Colour = "red";
  MyList.Add(MyItem);
  MyItem.Colour = "blue";
  MyList.Add(MyItem);
  MyItem.Colour = "white";
  MyList.Add(MyItem);
  </code></pre>
  
  <p>And my list will now contain 3 elements - red, blue, white.</p>
  
  <p>I think I can do this by:</p>
  
  <p>Item MyItem = new Item();</p>
  
  <pre><code>MyItem.Colour = "red";
  MyList.Add(MyItem);
  
  MyIten = new Item();
  MyItem.Colour = "blue";
  
  MyItem = new Item();
  MyList.Add(MyItem);
  
  MyItem = new Item();
  MyItem.Colour = "white";
  MyList.Add(MyItem);
  </code></pre>
  
  <p>Again, this is simplified. With my real data there are a lot more elements.</p>
  
  <p>I'll try that out; </p>
  
  <p>TIA - Andrew</p>