Export (0) Print
Expand All

Core.Ref<'T> Record (F#)

The type of mutable references. Use the operators := and ! to get and set values of this type.

Namespace/Module Path: Microsoft.FSharp.Core

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

[<StructuralEquality>]
[<StructuralComparison>]
type Ref<'T> =
 { mutable contents : 'T }
 with
  interface IStructuralEquatable
  interface IComparable
  interface IComparable
  interface IStructuralComparable
  member this.Value :  'T with get, set
 end

For an overview of reference cells, see Reference Cells (F#).

This type is named FSharpRef in compiled assemblies. If you are accessing the type from a language other than F#, or through reflection, use this name.

Field

Description

contents

Type: 'T

The current value of the reference cell.

Member

Description

Value

The current value of the reference cell

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

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

Show:
© 2014 Microsoft