Returns a Boolean value that indicates whether the object represented by the given proxy is contained in a different context than the object that called the current method.
Assembly: mscorlib (in mscorlib.dll)
A context is an ordered sequence of properties that define an environment for the objects that reside inside it. Contexts are created during the activation process for objects that are configured to require certain automatic services such synchronization, transactions, just-in-time activation, security, and so on. Multiple objects can live inside a context.
// Create a remote version of TempConverter.Converter. TempConverter.Converter converter1 = (TempConverter.Converter) Activator.GetObject( typeof(TempConverter.Converter), "http://localhost:8085/TempConverter"); // Create a local version of TempConverter.Converter. TempConverter.Converter converter2 = new TempConverter.Converter(); // Returns true, converter1 is remote and in a different appdomain. System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain( converter1); // Returns false, converter2 is local and running in this appdomain. System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain( converter2); // Returns true, converter1 is remote and in a different context. System.Runtime.Remoting.RemotingServices.IsObjectOutOfContext( converter1); // Returns false, converter2 is local and running in this context. System.Runtime.Remoting.RemotingServices.IsObjectOutOfContext( converter2);