diff options
Diffstat (limited to 'mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs')
-rw-r--r-- | mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs index 90db146c267..30234367827 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs @@ -92,7 +92,7 @@ namespace System.Runtime.Remoting { uri = RemotingServices.GetObjectUri(mbr); typeInfo = new TypeInfo(type); - if (!typeInfo.CanCastTo(mbr.GetType(), mbr)) + if (!type.IsAssignableFrom (mbr.GetType())) throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + "."); UpdateChannelInfo(); |