Share via


Array.append<'T> Function (F#)

Creates an array that contains the elements of one array followed by the elements of another array.

Namespace/Module Path: Microsoft.FSharp.Collections.Array

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

// Signature:
Array.append : 'T [] -> 'T [] -> 'T []

// Usage:
Array.append array1 array2

Parameters

  • array1
    Type: 'T[]

    The first input array.

  • array2
    Type: 'T[]

    The second input array.

Return Value

The resulting array.

Remarks

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

Example

The following example demonstrates the use of Array.append.

printfn "%A" (Array.append [| 1; 2; 3|] [| 4; 5; 6|])
[|1; 2; 3; 4; 5; 6|]

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

Collections.Array Module (F#)

Microsoft.FSharp.Collections Namespace (F#)