Tutorial :Detect a transparent proxy vs actual object reference?



Question:

Given an object reference, is it possible to programmatically determine if the object was created in the current appdomain or instead is a proxy to an object in another appdomain?


Solution:1

Try the following

var isProxy = RemotingServices.IsTransparentProxy(obj);  

System.Runtime.Remoting.RemotingServices.IsTransparentProxy


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »