Table of contents
TOC
Collapse the table of content
Expand the table of content

ExtraTopLevelOperators.array2D<'T> Function (F#)

Den Delimarsky|Last Updated: 7/5/2016
|
1 Contributor

Builds a 2D array from a sequence of sequences of elements.

Namespace/Module Path: Microsoft.FSharp.Core.ExtraTopLevelOperators

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

Syntax

// Signature:
array2D : seq<#seq<'T>> -> 'T [,]

// Usage:
array2D rows

Parameters

rows Type: seq<'T>

The sequence of sequences for the array rows.

Remarks

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

Example

The following code shows how to initialize a two-dimensional array using array2D.

let myArray2D : string[,] = array2D [["a1"; "b1"; "c1"]; ["a2"; "b2"; "c2"]] 

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

Core.ExtraTopLevelOperators Module (F#)

Microsoft.FSharp.Core Namespace (F#)

© 2017 Microsoft