System.Environment: Method Members

The methods of System.Environment are listed below. For a list of all members, see the Environment Members list.

See Also: Inherited members from System.Object

Public Methods

static
Exit(int)

Terminates this process and gives the underlying operating system the specified exit code.

static
ExpandEnvironmentVariables(string) : string

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.

static
FailFast(string)

Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message in error reporting to Microsoft.

static
FailFast(string, Exception)

Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message and exception information in error reporting to Microsoft.

static
GetCommandLineArgs() : string[]

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

static
GetEnvironmentVariable(string) : string

Retrieves the value of an environment variable from the current process.

static
GetEnvironmentVariable(string, EnvironmentVariableTarget) : string

Retrieves the value of an environment variable from the current process or from the Windows operating system registry key for the current user or local machine.

static
GetEnvironmentVariables() : IDictionary

Retrieves all environment variable names and their values from the current process.

static
GetEnvironmentVariables(EnvironmentVariableTarget) : IDictionary

Retrieves all environment variable names and their values from the current process, or from the Windows operating system registry key for the current user or local machine.

static
GetFolderPath(Environment.SpecialFolder) : string
Returns the path on the file system corresponding to the special folder.
static
GetFolderPath(Environment.SpecialFolder, Environment.SpecialFolderOption) : string
Documentation for this section has not yet been entered.
static
GetLogicalDrives() : string[]

Returns an array of string containing the names of the logical drives on the current computer.

static
SetEnvironmentVariable(string, string)

Creates, modifies, or deletes an environment variable stored in the current process.

static
SetEnvironmentVariable(string, string, EnvironmentVariableTarget)

Creates, modifies, or deletes an environment variable stored in the current process or in the Windows operating system registry key reserved for the current user or local machine.