TypeIsAssignableFrom Method |
Determines whether an instance of the current
Type can be assigned from an instance of the specified Type.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public virtual bool IsAssignableFrom(
Type c
)
Parameters
- c
- Type: SystemType
The type to compare with the current type.
Return Value
Type:
Booleantrue if
c and the current Type represent the same type, or if the current Type is in the inheritance hierarchy of
c, or if the current Type is an interface that
c implements, or if
c is a generic type parameter and the current Type represents one of the constraints of
c. false if none of these conditions are true, or if
c is null.
See Also