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 30234367827..90db146c267 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 (!type.IsAssignableFrom (mbr.GetType())) + if (!typeInfo.CanCastTo(mbr.GetType(), mbr)) throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + "."); UpdateChannelInfo(); |