Share via


VersionOption Constructors

Definition

Overloads

Name Description
VersionOption()

Initializes a new instance of VersionOption.

VersionOption(String, String[])

Initializes a new instance of VersionOption.

VersionOption()

Source:
VersionOption.cs
Source:
VersionOption.cs

Initializes a new instance of VersionOption.

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

Remarks

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

Applies to

VersionOption(String, String[])

Source:
VersionOption.cs
Source:
VersionOption.cs

Initializes a new instance of VersionOption.

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[]

Remarks

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

Applies to