Expr.TryWith 方法 (F#)
建立運算式,表示 try...with篩選和攔截的例外狀況為建構
命名空間/模組路徑: Microsoft.FSharp.Quotations
組件:FSharp.Core (在 FSharp.Core.dll 中)
// Signature:
static member TryWith : Expr * Var * Expr * Var * Expr -> Expr
// Usage:
Expr.TryWith (body, filterVar, filterBody, catchVar, catchBody)
參數
body
型別:Exprtry 運算式的主體。
filterVar
型別:VarfilterBody
型別:ExprcatchVar
型別:Var要繫結至已攔截例外狀況的變數。
catchBody
型別:Expr攔截到例外狀況時評估的運算式。
傳回值
產生的運算式。
平台
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