共用方式為


Core.OptionalArgumentAttribute 類別 (F#)

對於所有選擇性引數,都會自動加入這個屬性。

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

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

[<AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)>]
[<Sealed>]
type OptionalArgumentAttribute =
 class
  new OptionalArgumentAttribute : unit -> OptionalArgumentAttribute
 end

備註

您可以將這個屬性套用至本身是選項類型的參數,使它成為選擇性參數。 這相當於套用 ? 至參數清單中的參數名稱。 選擇性參數後面不可以是參數清單中的非選擇性參數。

您也可以使用名稱的簡短形式 OptionalArgument

建構函式

成員

描述

new

建立屬性的執行個體

平台

Windows 8 中, Windows 7, Windows Server 2012 上, Windows Server 2008 R2

版本資訊

F# 核心程式庫版本

支援版本:2.0, 4.0,可攜式執行檔 (PE)。

請參閱

參考

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