What's dumb is that to implement such a remotable collection is just a
matter of implementing the required interfaces and inheriting
MarshalByRefObject. So why didn't Microsoft just provide remotable
collections?
I suppose that it's simply to avoid people from mistakenly remoting a
collection by reference, which, in the vast majority of cases, is a very
bad idea. If collections were MarshalByRefObject, then whenever they would
be used as an argument or return value of a remote method (which is a very
common scenario), they would by default be passed as MarshalByRefObject.
Many developers without a good experience of .NET Remoting and without very
good testing practices may not notice the problem straight away since
testing during development time is usually done either locally or within a
fast LAN where the overhead of remoting a collection by reference might go
unoticed. But when they would deploy their app in the real world, BANG, the
whole thing would collapse. Not to mention that if later the application
has to be modified, the maintainer might not notice this kind of subtelty
if there are not appropriate comments in the code. If there is really a
need to access a remote collection by reference, then writing a simple
MarshalByRefObject wrapper class that provides the required functionnality
is straightforward and would avoid this kind of problems.
Even when designing a .NET Remoting system where both the server and client
application are to run on the same computer, i believe that designing the
system so that it could also be used if both applications are remote is
often (not always of course) a good idea. It often doesn't really requires
much more work and if later the need arises to run both app on 2 separate
computers, it would just be a matter of changing a few lines of code or a
configuration file and would not mean to have to redesign the whole thing.