Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Option.Required Property

Definition

Namespace:
System.CommandLine
Assembly:
System.CommandLine.dll
Package:
System.CommandLine v3.0.0-preview.5.26302.115
Source:
Option.cs
Source:
Option.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Indicates whether the option is required when its parent command is invoked.

public:
 property bool Required { bool get(); void set(bool value); };
public bool Required { get; set; }
member this.Required : bool with get, set
Public Property Required As Boolean

Property Value

Remarks

When an option is required and its parent command is invoked without it, an error results.

Applies to


Feedback

Was this page helpful?