On 9/28/06, Harris Boyce III <[EMAIL PROTECTED]> wrote:
Right and I think this is where the rub lies.  I've been "brought-up"
that, unless the data is read-only, you just generally implement
read/write properties so I can easily implement it as:

List<Entry> Entries {
  get;
}

But even with that, nothing prevents the user accessing the feed from
calling theFeed.Entries.Add(someEntry);  Now, the implementation could
return a read-only List and then any modifying operations would
generate exceptions.  But...why would I do that?

Does that make any sense?  I'm hoping that this doesn't seem like an
immature conversation, but it's one that I struggle with when I study
Java.  Why wouldn't I just use those conveience methods to modify the
list if and when I need to do so?

Thanks again for the discussion!  I'm learning lots!

I wouldn't object to returning read-only lists in that sort of
situation.  Heck, I wouldn't object to doing so in Java either ;-)

-garrett

Reply via email to