public void addMoon(Moon m) { this.Moons.Add(m); //sorting after Add //this.Moons = this.Moons.OrderBy(m => m.MoonName).ToList(); }
public void printStat() { Console.WriteLine("--- Stats ---"); Console.WriteLine($"Galaxies: {Galaxy.GetActiveInstances() }"); Console.WriteLine($"Stars: {Star.GetActiveInstances() }"); Console.WriteLine($"Planets: {Planet.GetActiveInstances() }"); Console.WriteLine($"Moons: {Moon.GetActiveInstances() }"); Console.WriteLine("--- End of stats ---\n"); }
int ICountList.GetActiveInstances() { return(Moon.GetActiveInstances()); }