[Home] Module Microsoft.FSharp.Idioms


Type Definitions

TypeDescription
type sizeof

Deprecated/Unsafe Type Definitions

TypeDescription
type EventListeners

Note: Consider using IEvent.create_HandlerEvent instead

type Handler

Note: The 'Handler' type is now defined in Microsoft.FSharp.Control, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

Fresh events declared in F# are typically values of type Idioms.ICompatEvent<'a>. These hold event handlers of type Idioms.Handler<'a>. Note: an abbreviation for Handler<'a>
type IDelegateEvent

Note: The 'IDelegateEvent' type is now defined in Microsoft.FSharp.Control, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

See Microsoft.FSharp.IDelegateEvent Note: an abbreviation for IDelegateEvent<'del,'args>
type IEvent

Note: The 'IEvent' type is now defined in Microsoft.FSharp.Control, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

See Microsoft.FSharp.Control.IEvent Note: an abbreviation for IEvent<'a>
type IHandlerEvent

Note: This type has been renamed Microsoft.FSharp.Control.IHandlerEvent

Note: an abbreviation for IHandlerEvent<'a>
type typ

Note: This type is now defined in Microsoft.FSharp.Core, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

Note: an abbreviation for ReifiedType<'a>

Deprecated Values

ValueDescription
[<Obsolete
  ("The 'unbox' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete")>]
val box : 'a -> obj

Note: The 'unbox' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

Convert a value to the univeral representation type 'obj', where the argument type is inferred from context.
[<Obsolete ("Consider using '|||' instead")>]
val CombineEnumFlags : 'a list -> 'a when 'a :> Enum

Note: Consider using '|||' instead

Combine enum values using 'logical or'. The relevant enumeration type is inferred from context.
[<Obsolete ("Consider using Enum.to_int instead")>]
val EnumToInt : #Enum -> int

Note: Consider using Enum.to_int instead

Convert an enumeration value to an integer. The argument type is inferred from context.
[<Obsolete ("Consider using 'for x in enumerable do ...' instead")>]
val foreach : #IEnumerable -> ('a -> unit) -> unit

Note: Consider using 'for x in enumerable do ...' instead

This idiom corresponds to the C# "foreach" construct. Use as: 'foreach (collection) (fun (x:expectedType) -> ...)'. Try using 'Idioms.foreachG' before using this function, as that detects if the collection supports a typesafe IEnumerable<T>. If any element of the heterogeneous collection does not have the given type then a runtime error will be raised. Not all F# collection types directly implement the required interfaces, hence you may need to call a projection function such as 'CollectionType.to_IEnumerable'.
[<Obsolete ("Consider using 'for x in enumerable do ...' or Seq.iter instead")>]
val foreachG : #IEnumerable<'a> -> ('a -> unit) -> unit

Note: Consider using 'for x in enumerable do ...' or Seq.iter instead

Enumerator iteration. See 'foreach'.
[<Obsolete ("Consider using Enum.of_int instead")>]
val IntToEnum : int -> #Enum

Note: Consider using Enum.of_int instead

Convert an integer to an enumeration value. The result type is inferred from context.
[<Obsolete
  ("The 'using' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete")>]
val lock : 'b -> (unit -> 'a) -> 'a

Note: The 'using' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

[<Obsolete
  ("Consider using an array expression '[| arg1; ...; argN |]' rather than the 'ParamArray' function")>]
val ParamArray : 'a list -> 'a []

Note: Consider using an array expression '[| arg1; ...; argN |]' rather than the 'ParamArray' function

Use when calling a method from another .NET language that expects a variable number of arguments.
[<Obsolete
  ("The 'sizeof' operator is now defined in Microsoft.FSharp.Core.Operators, which is automaticlly opened, and used as 'sizeof'. Avoid using or opening the Idioms module which is now obsolete")>]
val sizeof : unit -> 'a sizeof

Note: The 'sizeof' operator is now defined in Microsoft.FSharp.Core.Operators, which is automaticlly opened, and used as 'sizeof'. Avoid using or opening the Idioms module which is now obsolete

[<Obsolete ("Consider using Enum.test instead")>]
val TestEnumFlag : 'a -> 'a -> bool when 'a :> Enum

Note: Consider using Enum.test instead

Test if an enumeration value has a particular flag set, using 'logical and'. The relevant enumeration type is inferred from context.
[<Obsolete ("Consider using typeof instead")>]
val typeof : unit -> 'a typ

Note: Consider using typeof instead

[<Obsolete
  ("The 'unbox' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete")>]
val unbox : obj -> 'a

Note: The 'unbox' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

Convert a value from the univeral representation type 'obj' to another type, where the result type is inferred from context.
[<Obsolete
  ("The 'using' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete")>]
val using : 'a -> ('a -> 'b) -> 'b when 'a :> IDisposable

Note: The 'using' operator is now defined in Microsoft.FSharp.Core.Operators, which is opened by default. Avoid using or opening the Idioms module which is now obsolete

See Also

Microsoft.FSharp


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19