PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Type­Spec­Declaration Class / Type­Spec­Declaration Methods / Type­Spec­Declaration.​Get­Canonical­Hash­Code Method

TypeSpecDeclaration.GetCanonicalHashCode Method

Gets a hash code that is invariant under type signature equality (i.e. if two types are equal under IEquatable<T>, they have the same canonical hash code).

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public int GetCanonicalHashCode()

Return Value

Type: Int32
A hash code that is invariant under type signature equality.

Implements

ITypeSignature.GetCanonicalHashCode()
Remarks
This method is of course useful to build dictionaries. The TypeComparer class uses this method.
See Also