|
-
June 21st, 2007, 09:47 AM
#14
Re: What's with all the Get/Set lines?
 Originally Posted by TheCPUWizard
The reasons for using properties, and ALWAYS keeping data private, is that it gives you the flexability to change the internal representation without effecting your clients. It also provides "hooks" for intercepting all read/write accesses.
I'm sure you had some specific examples in mind as you were providing this broad and generalized statement. ? And it could be that your examples are not applicable to my scenarios but I'm willing to see if they are.
In the past i did most of my hooking after the var is assigned a value so I'm not sure of the benefit of before its assigned. Seem like 6-to-1 1/2 dozen to the other.
 Originally Posted by TheCPUWizard
There is (almost) nevery a reason to have data members directly exposed.
The words "quick", "easy", "full access" don't come to mind here?
Last edited by alan93; June 21st, 2007 at 09:49 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|