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