TypeRef.IsAssignableFrom(TypeRef) 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 if the type represented by the given TypeRef can be assigned to the type represented by this instance.
public bool IsAssignableFrom (Microsoft.VisualStudio.Composition.Reflection.TypeRef other);
member this.IsAssignableFrom : Microsoft.VisualStudio.Composition.Reflection.TypeRef -> bool
Public Function IsAssignableFrom (other As TypeRef) As Boolean
Parameters
- other
- TypeRef
TypeRef to compare to
Returns
true if the given TypeRef can be assigned to this instance, false otherwise.
Remarks
The assignability check is done by traversing all the base types and interfaces of the given TypeRef to check if any of them are equal to this instance. Should that fail, the CLR is asked to check for assignability which will trigger an assembly load.