Environment Methods

Environment Methods

 

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticExit(Int32)

Terminates this process and returns an exit code to the operating system.

System_CAPS_pubmethodSystem_CAPS_staticExpandEnvironmentVariables(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.

System_CAPS_pubmethodSystem_CAPS_staticFailFast(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.

System_CAPS_pubmethodSystem_CAPS_staticFailFast(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.

System_CAPS_pubmethodSystem_CAPS_staticGetCommandLineArgs()

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

System_CAPS_pubmethodSystem_CAPS_staticGetEnvironmentVariable(String)

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

System_CAPS_pubmethodSystem_CAPS_staticGetEnvironmentVariable(String, EnvironmentVariableTarget)

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.

System_CAPS_pubmethodSystem_CAPS_staticGetEnvironmentVariables()

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

System_CAPS_pubmethodSystem_CAPS_staticGetEnvironmentVariables(EnvironmentVariableTarget)

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.

System_CAPS_pubmethodSystem_CAPS_staticGetFolderPath(Environment.SpecialFolder)

Gets the path to the system special folder that is identified by the specified enumeration.

System_CAPS_pubmethodSystem_CAPS_staticGetFolderPath(Environment.SpecialFolder, Environment.SpecialFolderOption)

Gets the path to the system special folder that is identified by the specified enumeration, and uses a specified option for accessing special folders.

System_CAPS_pubmethodSystem_CAPS_staticGetLogicalDrives()

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

System_CAPS_pubmethodSystem_CAPS_staticSetEnvironmentVariable(String, String)

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

System_CAPS_pubmethodSystem_CAPS_staticSetEnvironmentVariable(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.

Return to top
Show:
© 2016 Microsoft