namespace GetterAndSetter
public Planet(int worldSize, int population)
public int WorldSize { get; set; }
public string TypeOfEcosystem { get; set; }
if (value > WorldSize / 10) throw new Exception("Cannot make a population over 1/10 of the world size.");
static void Main(string[] args)
var planet = new Planet(100000000, 50596);