You need an instance of your Program
class:
static void Main(string[] args)
{
Program p = new Program(); // p is the instance.
foreach(var player in p.myListOfPlayers)
{
}
}
This is the equivalent of:
Dim p As New Program
Alternatively you could make myListOfPlayers
static.
As an additional comment, you should try and follow proper naming conventions, for example: C#
classes should have their first letter capitalized. players
should be Players
.