all groups > dotnet remoting > june 2007 >
You're in the

dotnet remoting

group:

casting remote objects late binding


casting remote objects late binding alex.kratshteyn NO[at]SPAM gmail.com
6/8/2007 5:14:47 AM
dotnet remoting:
The following always evaluates to true
bool isIMyInterface = (node.Tag is IMyInterface);
if (isIMyInterface)
node.Tag is a remote object
(IMyInterface) node.Tag also has no errors
it is when I actually trying to call a method on IMyInterface I got
error:
System.Runtime.Remoting.RemotingException
Cannot load type
If I use a class instead of the interface when it works. However
several classes implement IMyInterface. What is the right thing to do
here?
Thank you
Re: casting remote objects late binding alex.kratshteyn NO[at]SPAM gmail.com
6/8/2007 5:52:18 AM
I can use following to determine if it is a remote object
if (!(RemotingServices.IsTransparentProxy(node.Tag)))
It is still not clear how to use interfaces with remoting.

AddThis Social Bookmark Button