Share via


Quotations.Var Constructor (F#)

Creates a new variable with the given name, type and mutability.

Namespace/Module Path: Microsoft.FSharp.Quotations

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

// Signature:
new Var : string * Type * ?bool -> Var

// Usage:
new Var (name, typ)
new Var (name, typ, isMutable = isMutable)

Parameters

  • name
    Type: string

    The declared name of the variable.

  • typ
    Type: Type

    The type associated with the variable.

  • isMutable
    Type: bool

    Indicates if the variable represents a mutable storage location. The default value is false.

Return Value

The created variable.

Platforms

Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2

Version Information

F# Runtime

Supported in: 2.0, 4.0

Silverlight

Supported in: 3

See Also

Reference

Quotations.Var Class (F#)

Microsoft.FSharp.Quotations Namespace (F#)