What are the differences between Marshal by value and
Marshal by reference?

Answer Posted / j's

Marshal-by-value objects are copied by the remoting system
and passed in their entirety to the caller's application
domain. Once copied to the caller's application domain (by
the marshaling process), all method calls and property
accesses are executed entirely within that domain. The
entire object exists in the caller's domain, so there is no
need to marshal accesses across domain boundaries. Using
marshal-by-value objects can increase performance and
reduce network traffic when used for small objects or
objects to which you will be making many accesses. However,
because the object exists entirely in the caller's
application domain, no state changes to the object are
communicated to the originating application domain, or from
the originator back to the caller. Marshal-by-value is not
a good choice for very large objects with many accesses. It
makes little sense to marshal an entire large object across
domain boundaries when all you need is access to a single
field, method, or property.

Is This Answer Correct ?    31 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are static assemblies and dynamic assemblies. Differences between them?

628


Explain serialization formatters in .net remoting

564


What are the difference between static assemblies and dynamic assemblies?

566


How do you directly call a native function exported from a DLL?

6649


What are different types of assemblies?

572






What are the security measures exist for .net remoting in system.runtime.remoting?

593


What are the different types of channels used by .net remoting and which is the best one?

488


Write a example code for remoting?

520


Explain the difference between the registerwellknownservicetype(), registerwellknownclienttype(), registeractivatedservicetype() and registeractivatedclienttype() in .net?

520


Can we configure a .net remoting object via xml file?

524


Is it a good design practice to distribute the implementation to remoting client?

502


Explain the types of .net remoting?

606


Define delegates and events?

574


what are the requirements to enable remote components to interact each other?

530


How can you configure a .net remoting object via xml file?

549