Possible Duplicate:
Why use getters and setters?
I see this a fair bit in code examples...
private List<Car> cars;
public List<Car> Cars
{
get { return this.cars; }
set { this.cars = value; }
}
What's the benefit of that over just:
public List<Car> cars;
?
Thank you.