The “Set” Accessor:
1. This gets called automatically, whenever a value is assigned to the property in the client code. Ex: obj.property = value;
2. The value that is assigned in the client code is available as ―implicit parameter,named value in this set accessor.
3. This accessor can‘t return any value.
The “Get” Accessor:
1. This gets called automatically, whenever the property value is requested in the client code. Ex: obj.property
2. No implicit parameters are available.
3. This accessor should return the value of the property.
1. This gets called automatically, whenever a value is assigned to the property in the client code. Ex: obj.property = value;
2. The value that is assigned in the client code is available as ―implicit parameter,named value in this set accessor.
3. This accessor can‘t return any value.
The “Get” Accessor:
1. This gets called automatically, whenever the property value is requested in the client code. Ex: obj.property
2. No implicit parameters are available.
3. This accessor should return the value of the property.