IRemotingTypeInfo.CanCastTo(Type, Object) Method     
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks whether the proxy that represents the specified object type can be cast to the type represented by the IRemotingTypeInfo interface.
public:
 bool CanCastTo(Type ^ fromType, System::Object ^ o);
	public bool CanCastTo(Type fromType, object o);
	[System.Security.SecurityCritical]
public bool CanCastTo(Type fromType, object o);
	abstract member CanCastTo : Type * obj -> bool
	[<System.Security.SecurityCritical>]
abstract member CanCastTo : Type * obj -> bool
	Public Function CanCastTo (fromType As Type, o As Object) As Boolean
	Parameters
- fromType
 - Type
 
The type to cast to.
- o
 - Object
 
The object for which to check casting.
Returns
true if cast will succeed; otherwise, false.
- Attributes
 
Exceptions
The immediate caller makes the call through a reference to the interface and does not have infrastructure permission.
Remarks
The current method is called when an attempt is made to cast a proxy generated from a ObjRef. This method takes into account the type information carried in the ObjRef.