Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ExtraTopLevelOperators.array2D<'T> Function (F#)

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

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)

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

// Usage:
array2D rows


Type: seq<'T>

The sequence of sequences for the array rows.

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.

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

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

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

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

© 2015 Microsoft