-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
See the properties exercise.
There 7 features required for the properties exercise:
-
If
WeighingMachine.Unitsis not auto-implemented
then the following comment should be made: "The appropriate form
for a property such asWeighingMachine.Unitswhich has no validation or other processing required is
that for an auto-implemented property". - Approved with comment. -
If
WeighingMachine.DisplayWeighthas a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such asWeighingMachine.DisplayWeightwhich simply returns a value
to have a set accessor. That should be removed.". - Approved with comment. -
If
WeighingMachine.USDisplayWeighthas a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such asUSWeighingMachine.DisplayWeightwhich simply returns a value
to have a set accessor. That should be removed.". - Approved with comment. -
If
USDisplayWeight.Poundshas a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such asUSDisplayWeight.Poundswhich simply returns a value
to have a set accessor. That should be removed.". - Approved with comment. -
If
USDisplayWeight.Ounceshas a non-private set accessor
then the following comment should be made: "It is not approprirate
for a property such asUSDisplayWeight.Ounceswhich simply returns a value
to have a set accessor. That should be removed.". - Approved with comment. -
If
WeighingMachine.TareAdjustementis not an auto-implemented property
then the following commen should be made: "A succinct way of implementing
WeighingMachine.TareAdjustmentis as an auto-implemented property with a
privateget accessor". - Approved with comment. -
If
WeighingMachine.TareAdjustmentis an auto-implemented property
but the get accessor is non-private then the following comment should be made:
"A non-private set accessor is not appropriate forWeighingMachine.TareAdjustment
as the instructions stipulate that the value must not be available outside the
class". - Disapproved.