How can I find out if an instance is a MarshalByRef proxy?
Posted
by Will
on Stack Overflow
See other posts from Stack Overflow
or by Will
Published on 2010-03-18T16:02:17Z
Indexed on
2010/03/18
16:11 UTC
Read the original article
Hit count: 442
I know there's a way, I know I've done it (a long time) before, but I can't remember or find out how to do it!!!
var otherDomain = AppDomain.Create("Lol my memory sucks");
var myRemotableType = typeof(MyTypeThatExtendsMBRO);
var proxy = otherDomain
.CreateInstanceAndUnwrap(
type.Assembly.FullName,
type.FullName);
// how do you do this next step???
bool isProxy = IsYouIsOrIsYouAintAProxy(proxy);
© Stack Overflow or respective owner