Core.EqualityConditionalOnAttribute Class (F#)

This attribute is used to indicate a generic container type satisfies the F# equality constraint only if a generic argument also satisfies this constraint. For example, adding this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports equality if the type X also supports equality and all other conditions for C<X> to support equality are also met. The type C<'T> can still be used with other type arguments, but a type such as C<(int -> int)> will not support equality because the type (int -> int) is an F# function type and does not support equality.

Namespace/Module Path: Microsoft.FSharp.Core

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

[<AttributeUsage(AttributeTargets.GenericParameter, AllowMultiple = false)>]
[<Sealed>]
type EqualityConditionalOnAttribute =
 class
  new EqualityConditionalOnAttribute : unit -> EqualityConditionalOnAttribute
 end

Remarks

This attribute will be ignored if it is used on the generic parameters of functions or methods.

You can also use the short form of the name, EqualityConditionalOn.

Constructors

Member

Description

new

Creates an instance of the attribute

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

Reference

Microsoft.FSharp.Core Namespace (F#)