Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Environment Methods

Environment Methods

The Environment type exposes the following members.

  NameDescription
Public method Static member Exit Terminates this process and gives the underlying operating system the specified exit code.
Public method Static member ExpandEnvironmentVariables Replaces the name of each environment variable embedded in the specified string with the string equivalent of the value of the variable, then returns the resulting string.
Public method Static member FailFast Terminates a process but does not execute any active try-finally blocks or finalizers.
Public method Static member GetCommandLineArgs Returns a string array containing the command-line arguments for the current process.
Public method Static member GetEnvironmentVariable Overloaded. Retrieves the value of an environment variable.
Public method Static member GetEnvironmentVariables Overloaded. Retrieves all environment variable names and their values.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework GetFolderPath Gets the path to the system special folder identified by the specified enumeration.
Public method Static member GetLogicalDrives Returns an array of string containing the names of the logical drives on the current computer.
Public method Static member SetEnvironmentVariable Overloaded. Creates, modifies, or deletes an environment variable.
Top

Community Additions

ADD
Show:
© 2015 Microsoft