AdapterHelper.CanonicalizeType Method
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
Resolves the canonical form of a type.
public static Type CanonicalizeType(Type type)Parameters
typeType- The type to canonicalize.
Returns
- Type
- A canonicalized version of the type if applicable; otherwise, the original type.

typeofresults but are not reference-equal when using the default equality comparer.When a nested generic type definition is accessed via inheritance, the returned Type instance may be incorrectly flagged as a constructed generic type despite having only generic parameters as type arguments. This leads to discrepancies in equality comparisons, especially when such types are used as keys in collections that rely on reference equality.