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.