Yes you can access the variables directly from a class. But as a matter of "best practice", you should use the methods (e.g. getter/setter) to access the variables. It is through these methods that some other code (like validating them for instance) is required to run prior to getting/setting the values.
Benj On Dec 16, 6:01 pm, hanks2000 <[email protected]> wrote: > That is true, the argument against it was that nothing but the > Property should have access to the variable. I have always believed > that the class should have access to its own variable, and as you have > pointed out it is silly to use a Property to get or set the value when > its there to access directly > > Cheers for that, puts my mind at rest that I'm using the correct/best > method
