using System;
public class Program
{
class player
private int _health = 100;
public int health
get
return _health; //whenever we want to get the hea;th of our player, it is going to get the private _health amount. This means we are not able to change the _health variable unless it's in the same class
}
set
_health = value;
public static void Main()
player tom = new player();
Console.WriteLine(tom.health);
tom.health = 20;
//this is anoter way.