title: Getting an object variable from List in C#
body: <p>I have class with variables:</p>
  
  <pre><code>public class Items {
      public string name;
      public string ID;
  }
  </code></pre>
  
  <p>and I have second class when I have List of object of first class</p>
  
  <pre><code>public class MyClass {
      public Items cheese;
      public List &lt;Items&gt; listOfItems = new List ();
      listOfItems.Add (cheese); // I know it should be in method or something but it's just an example
  }
  </code></pre>
  
  <p>and I want get the name of the cheese, but using my list, because I have above 20 items in my list.
  In Java I can do it like:</p>
  
  <pre><code>listOfItems.get(1).name; // 1 is an index
  </code></pre>
  
  <p>How can I do it in C#?
  // Please don't try to improve my</p>