public int PetName
{
get { return carName; }
}
This same possibility is allowed using automatic property syntax as follows:
Of course, with this update, the previous Main() method would now generate a compiler error
when attempting to assign the value of the PetName property:
C H A P T E R 1 3
C # 2 0 0 8 L A N G U A G E F E AT U R E S
8849CH13.qxd 10/2/07 12:42 PM Page 422
...