Edit

Share via


VersionOption Constructors

Definition

Overloads

VersionOption()

When added to a Command, it enables the use of a --version option, which when specified in command line input will short circuit normal command handling and instead write out version information before exiting.

VersionOption(String, String[])

When added to a Command, it enables the use of a provided option name and aliases, which when specified in command line input will short circuit normal command handling and instead write out version information before exiting.

VersionOption()

Source:
VersionOption.cs

When added to a Command, it enables the use of a --version option, which when specified in command line input will short circuit normal command handling and instead write out version information before exiting.

public:
 VersionOption();
public VersionOption();
Public Sub New ()

Applies to

VersionOption(String, String[])

Source:
VersionOption.cs

When added to a Command, it enables the use of a provided option name and aliases, which when specified in command line input will short circuit normal command handling and instead write out version information before exiting.

public:
 VersionOption(System::String ^ name, ... cli::array <System::String ^> ^ aliases);
public VersionOption(string name, params string[] aliases);
new System.CommandLine.VersionOption : string * string[] -> System.CommandLine.VersionOption
Public Sub New (name As String, ParamArray aliases As String())

Parameters

name
String
aliases
String[]

Applies to