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

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 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2

F# Runtime

Supported in: 2.0, 4.0

Silverlight

Supported in: 3

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft