Array.empty<'T> (Función de tipo de F#)
Devuelve una matriz vacía del tipo especificado.
Espacio de nombres/Ruta de acceso del módulo: Microsoft.FSharp.Collections.Array
Ensamblado: FSharp.Core (en FSharp.Core.dll)
// Signature:
Array.empty<'T> : 'T []
// Usage:
Array.empty
Valor devuelto
Una matriz vacía.
Comentarios
Esta función se denomina Empty en los ensamblados compilados.Si obtiene acceso a la función desde un lenguaje .NET distinto de F# o mediante reflexión, use este nombre.
Ejemplo
En el siguiente código se muestra cómo usar Array.empty.
// Specify the type by using a type argument.
let array1 = Array.empty<int>
// Specify the type by using a type annotation.
let array2 : int array = Array.empty
// Even though array3 has a generic type,
// you can still use methods such as Length on it.
let array3 = Array.empty
printfn "Length of empty array: %d" array3.Length
Output
Plataformas
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
Información de versiones
Versiones de la biblioteca básica de F#
Se admite en: 2.0, 4.0, portables