CliGetArgs Method

Returns a string array containing the command-line arguments for the current process.

Uses GetCommandLineArgs but skips the first element which is the executable file name, so the following zero or more elements that contain the remaining command-line arguments are returned, i.e. returns the same as the special variable args available in Program.cs (new style with top-level statements) or as the string array passed to the program's Main method (old style).

Also on Windows platform, backslash + double quote (\") at the end of an argument, is usually a path separator and not an escape for double quote, so it will be trimmed to prevent unnecessary path errors.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.7
C#
public static string[] GetArgs()

Return Value

String
An array of strings where each element contains a command-line argument.

See Also