❔ ✅ why properties instead of public fields

in this case
class Person
{
  public int age;
  //vs
  public int Age {get; set;}
}
Was this page helpful?