Share via


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

Remarks

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.

Fields

Field

Description

contents

Type: 'T

The current value of the reference cell.

Instance Members

Member

Description

Value

The current value of the reference cell

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#)