TypeDecoratorAdapter.IsSubstitutableBy Method
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
Determines whether the specified type as a parameter type can be substituted for the current type.
public override bool IsSubstitutableBy(IType other)Parameters
otherIType- The type to check against the current type.

The following conditions make the other type substitutable for the current type:
- The current type and the other type represent the same type.
- Both types are a decorated type (e.g., array, pointer, by-ref, or nullable) with identical modifiers and their element types are also satisfiable.
- Both types are generic type parameters with identical constraints and declaring member ancestry.
- The current type is a generic type parameter, and the other type is a type that satisfies all of its constraints.
For all other cases, the current type is not considered substitutable by the other type.