× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



From: Walden H. Leverich

You can implement read-only and write-only properties with get/set
but not with member variables - they are always read-write.

Good point.

And just to be clear so I can get out of this thread before I start
rummaging around for a pocket protector: I don't recommend the use of public
member/instance variables.

I DO use them in one specific case: when I'm using an object solely as a
data structure. That is, the purpose of the object is simply to aggregate a
bunch of fields to pass from one place to another. No getters, no setters,
no business logic. Just passing multiple values from one place to another
with a single pointer. In that case, I happen to love the simple dot
notation.

And if you find THAT particular use offensive, so be it. I will stand
chastised, but unchanged. <smile>

Joe

P.S. If I'm reading this correctly, the simple dot notation is actually the
standard in .NET, but with implicit calls to getters/setters. That's
actually kind of neat, and I bet I cold get used to it.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.