InterfaceTypeAdapter.IsAssignableFrom Method

Namespace
Kampute.DocToolkit.Metadata.Adapters
Assembly
  • Kampute.DocToolkit.dll

Definition

Determines whether the instances of the specified type can be assigned to variables of the current type.
public override bool IsAssignableFrom(IType source)

Parameters

source IType
The source type to check against the current type.

Returns

bool
true if instances of the specified type can be assigned to variables of the current type; otherwise, false.

Remarks

The following conditions make the source type assignable to the current type:
  • The source is the same type as the current type.
  • The source is a subclass of the current type, either directly or indirectly.
  • The source implements the current interface type.
  • The source is a value type that is assignable to the underlaying type of the current nullable type.
Any other combination of types is considered not assignable.