Hi! Rocky
What's the any real practical scenario, where we need to pass mobile objects as a reference type as a parameter to other methods.
regards
Harmanjeet
When you pass any object (string, Guid, Customer, etc) to a method it is always pass by reference. Object instances are always passed by reference in .NET, end of story. Given that, there are countless practical scenarios where you "pass an object" as a parameter to a method
But I suspect that's not the intent of your question. Unfortunately I can't figure out what you are asking, can you please clarify?
Hi! Rocky
I asked the above Question in the context of Mobile Object. Were, do we need them to pass as reference instead of Value, in real pratical scenario.
not the generic concept of Pass by Value/Reference.
regards
Harmanjeet
There is no way to pass an object over the network by reference. Objects are copied or cloned across the network, so you always end up with a different instance of the object on the other machine. Read chapter 1 of the Expert Business Objects book for information on this.
Some technologies, like .NET Remoting, simulate passing objects over the network by reference. That is really not "by reference" - they are simulating the concept. CSLA has never used or supported that concept, which is good because that idea doesn't work in web services or (without some effort) WCF.
Hi!
thanks for reply.
i am satisfied with answer.
regards
Harmanjeet
Copyright (c) Marimer LLC