共用方式為


HashIdentity.Reference<'T> 型別函式 (F#)

實作實體雜湊,表示在物件的參考識別上和實質型別的內容上進行雜湊。

**命名空間/模組路徑:**Microsoft.FSharp.Collections.HashIdentity

組件:FSharp.Core (在 FSharp.Core.dll 中)

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

// Usage:
Reference

傳回值

實作 IEqualityComparer 的物件。

備註

這個函式會使用 LanguagePrimitives.PhysicalEqualityLanguagePrimitives.PhysicalHash 進行雜湊處理。 也就是說,實質型別請使用 GetHashCode和Equals(如果沒有其他可用的最佳化),參考型別則使用GetHashCode 並參考相等性。

平台

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

版本資訊

F# 核心程式庫版本

支援版本:2.0, 4.0,可攜式執行檔 (PE)。

請參閱

參考

Collections.HashIdentity 模組 (F#)

Microsoft.FSharp.Collections 命名空間 (F#)