共用方式為


Core.NoEqualityAttribute 類別 (F#)

將這個屬性加入至型別,表示在此型別中等號比較作業為異常作業。 這表示型別未滿足 F# 相等條件約束。 在 F# 型別系統的界限內,這有助於確定未在這個型別上直接執行個體化 F# 泛型相等函式。 此屬性與檢查動作不會限制與此型別的基底或子型別進行比較。

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

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

[<AttributeUsage(AttributeTargets.Class ||| AttributeTargets.Interface ||| AttributeTargets.Delegate ||| AttributeTargets.Struct ||| AttributeTargets.Enum, AllowMultiple = false)>]
[<Sealed>]
type NoEqualityAttribute =
 class
  new NoEqualityAttribute : unit -> NoEqualityAttribute
 end

備註

您也可以使用名稱的簡短形式 NoEquality

建構函式

成員

描述

new

建立屬性的執行個體

平台

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

版本資訊

F# 核心程式庫版本

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

請參閱

參考

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