Table of contents
TOC
Collapse the table of content
Expand the table of content

HashIdentity.Reference<'T> Type Function (F#)

Den Delimarsky|Last Updated: 8/18/2017
|
1 Contributor

Implements physical hashing, which means that it hashes on reference identity of objects, and the contents of value types.

Namespace/Module Path: Microsoft.FSharp.Collections.HashIdentity

Assembly: FSharp.Core (in FSharp.Core.dll)

Syntax

// Signature:
Reference<'T (requires reference type)> :  IEqualityComparer<'T> (requires reference type)

// Usage:
Reference

Return Value

An object that implements System.Collections.IEqualityComparer.

Remarks

This function hashes using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash. That is, for value types uses System.Object.GetHashCode and Overload:System.Object.Equals (if no other optimization available), and for reference types uses System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(System.Object) and reference equality.

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Collections.HashIdentity Module (F#)

Microsoft.FSharp.Collections Namespace (F#)

© 2018 Microsoft