Mono Class Library: System.Environment Overview | Members

System.Environment.CommandLine Property

Gets the information entered on the command line when the current process was started.

public static string CommandLine { get; }

Value

A string containing the command line arguments.

Remarks

This property is read-only.

This property provides access to the program name and any arguments specified on the command line when the current process was started.

If the environment does not support a program name, as can be the case with compact devices, then the program name is equal to string.Empty.

The format of the information returned by this property is implementation-specific.

Note:

The program name can, but is not required to, include path information.

Use the Environment.GetCommandLineArgs method to retrieve the command line information parsed and stored in an array of strings.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0