public static AnimalManager getInstance() { if (instance == null) { instance = new AnimalManager(); } return(instance); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); //test singleton AnimalManager.getInstance(); Stack stack = new Stack() { Numbers = new List <int> { 1, 7, 8, 9 } }; Console.WriteLine($"numbers at 2 = {stack[2]}"); }