Home Basic usage Argument Description
Post
Cancel

Argument Description

The argument description is used usually when displaying a help on user demand. Each argument should have a short description to help user understand what it means.

Set argument description

The argument description could be set either by using the Description property of the argument info, or by calling the extension method WithDescription.

1
2
3
4
5
6
7
// Setting the Argument Info property 
var usernameArg = new CliArg<string>(new CliArgsInfo("Username"));
usernameArg.Info.Description = "The user name in lower case"; 

// Setting during the argument creation 
var otherArg = CliArg.New<string>("Username")
                .WithDescription("The user name in lower case");

Example on results

Description Help