Field, property, methods are members in classes
class Forest { //A constructor with parameters are built to creat object and set those values at once public Forest(string name, string biome, int area) { this.Name = name; this.Biome = biome; this.Area = area; this.Age = 0; } //Each field is a variable and it will have a different value for each object. public string name; public int trees; //Area property with validation is associated with the area field. public int area; public int Area { get {return area;} set { if (value < 0) {area = 0;} else {area = value;} } } //Automatic properties, and a hidden field is defined in the background public string Size {get; set;} //A method IncreaseArea() is defined that changes the value of the Area property public int IncreaseArea(int growth) { Area = Area + growth; return Area; } } Forest f = new Forest("Congo", "Tropical", 400); f.name = "Song Tree"; f.trees = 99;