共用方式為


List.Item<'T> 屬性 (F#)

取得清單中所指定位置的項目。

命名空間/模組路徑: Microsoft.FSharp.Collections

組件:FSharp.Core (在 FSharp.Core.dll 中)

// Signature:
member this.Item (int) :  'T

// Usage:
list.[index]

參數

  • index
    型別:int

    索引。

傳回值

所指定索引的值。

備註

清單是以連結的清單形式表示,因此這是 O(n) 作業。

平台

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# 執行階段

支援版本:2.0、4.0

Silverlight

支援版本:3

請參閱

參考

Collections.List<'T> 等位 (F#)

Microsoft.FSharp.Collections 命名空間 (F#)