title: C# public list of objects
body: <p>I'm converting from VB to C# and struggling to workout how to access a public list of objects... </p>
  
  <pre><code>class Program
  {
      public List&lt;players&gt; myListOfPlayers = new List&lt;players&gt;();
  
      static void Main(string[] args)
      {
  
          foreach(var player in myListOfPlayers)
          {
  
          }
      } 
  
      class players
      {
          public string playerName { get; set; }
          public string playerCountry { get; set; }
  
      }
  }
  </code></pre>
  
  <p>In my Main module I can't access "myListOfPlayers".</p>