Using IsValid()
Thursday, December 2, 2010
Note that all of the authentic calculations occur on a call to the "Init" means, either unswervingly or indirectly through the "args" constructor. If the input parameters and result materialize valid, the "target" variable is set to a valid value. If the input parameters or result appear invalid, the "target" variable is set to -1. A public function "IsValid" is provided to the caller that returns the internal state of the object. The public function "IsValid" encapsulates or hides the internal validation logic. I would argue that the use of a public "IsValid" function is a widespread and useful programming idiom.
Labels:
Windows Forms
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment