When we call any method that's outside the machine boundaries ( remote methods ) , how does the CLR know this and then serialize ( or make copies of ) actual objects and not the memory addresses ( references to the actual objects ) to send when any method is called crossing the machine boundaries ?
This question came to my mind realizing that always a reference is sent when method is called, instead of its copy.
well, I am talking about any kind of remote call, be it a remoting or web service. I mean, the client has to call a method and send the parameters, now if it's local, it'll send just memory address of the objects to work with them, else it'll either make copy or serialize it in XML or alike. So, how does it know what to do ?