5.5. Access to the environment
The System.Environment class provides information about the current environment and platform. It contains the following properties and methods, which can be used in our applications:
CommandLine This property returns the String that contains the command line supplied for this process.
CurrentDirectory Indicates the directory (String type) from which this process was started.
ExitCode Specifies the exit code for this process as an Integer value.
MachineName Contains the String with the name of the computer you are using.
NewLine Contains the new line String for this environment.
OSVersion Contains an OperatingSystem object.
StackTrace This property returns the current stack trace information as a String.
SystemDirectory ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access