开发者

Detect a transparent proxy vs actual object reference?

开发者 https://www.devze.com 2022-12-15 20:29 出处:网络
Given an object reference, is it possible to programmatically determine if the object was created in the current appdomain or inst开发者_JAVA技巧ead is a proxy to an object in another appdomain?Try th

Given an object reference, is it possible to programmatically determine if the object was created in the current appdomain or inst开发者_JAVA技巧ead is a proxy to an object in another appdomain?


Try the following

var isProxy = RemotingServices.IsTransparentProxy(obj);

System.Runtime.Remoting.RemotingServices.IsTransparentProxy

0

精彩评论

暂无评论...
验证码 换一张
取 消