共用方式為


RuntimeHelpers.EnumerateUsing<'T,'Collection,'U> 函式 (F#)

F # 編譯器會發出這個函式呼叫來實作 use關鍵字的 F # 序列的運算式。

命名空間/模組路徑: Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers

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

// Signature:
RuntimeHelpers.EnumerateUsing : 'T -> ('T -> 'Collection) -> seq<'U> (requires 'T :> IDisposable and 'Collection :> seq<'U>)

// Usage:
RuntimeHelpers.EnumerateUsing resource source

參數

  • resource
    型別:'T

    要使用和處置的資源。

  • source
    型別:'T -> 'Collection

    輸入序列。

傳回值

結果序列。

平台

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

請參閱

參考

CompilerServices.RuntimeHelpers 模組 (F#)

Microsoft.FSharp.Core.CompilerServices 命名空間 (F#)

IDisposable