This documentation is archived and is not being maintained.

Environment Members

Environment overview

Public Properties

public propertystatic (Shared in Visual Basic)CommandLine Gets the command line for this process.
public propertystatic (Shared in Visual Basic)CurrentDirectory Gets and sets the fully qualified path of the current directory; that is, the directory from which this process starts.
public propertystatic (Shared in Visual Basic)ExitCode Gets or sets the exit code of the process.
public propertystatic (Shared in Visual Basic)HasShutdownStarted Indicates whether the common language runtime is shutting down or the current application domain is unloading.
public propertystatic (Shared in Visual Basic)MachineName Gets the NetBIOS name of this local computer.
public propertystatic (Shared in Visual Basic)NewLine Gets the newline string defined for this environment.
public propertystatic (Shared in Visual Basic)OSVersion

Supported by the .NET Compact Framework.

Gets an OperatingSystem object that contains the current platform identifier and version number.
public propertystatic (Shared in Visual Basic)StackTrace Gets current stack trace information.
public propertystatic (Shared in Visual Basic)SystemDirectory Gets the fully qualified path of the system directory.
public propertystatic (Shared in Visual Basic)TickCount

Supported by the .NET Compact Framework.

Gets the number of milliseconds elapsed since the system started.
public propertystatic (Shared in Visual Basic)UserDomainName Gets the network domain name associated with the current user.
public propertystatic (Shared in Visual Basic)UserInteractive Gets a value indicating whether the current process is running in user interactive mode.
public propertystatic (Shared in Visual Basic)UserName Gets the user name of the person who started the current thread.
public propertystatic (Shared in Visual Basic)Version

Supported by the .NET Compact Framework.

Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.
public propertystatic (Shared in Visual Basic)WorkingSet Gets the amount of physical memory mapped to the process context.

Public Methods

public methodstatic (Shared in Visual Basic)Exit Terminates this process and gives the underlying operating system the specified exit code.
public methodstatic (Shared in Visual Basic)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 methodstatic (Shared in Visual Basic)GetCommandLineArgs Returns a string array containing the command line arguments for the current process.
public methodstatic (Shared in Visual Basic)GetEnvironmentVariable Returns the value of the specified environment variable.
public methodstatic (Shared in Visual Basic)GetEnvironmentVariables Returns all environment variables and their values.
public methodstatic (Shared in Visual Basic)GetFolderPath Gets the path to the system special folder identified by the specified enumeration.
public methodstatic (Shared in Visual Basic)GetLogicalDrives Returns an array of string containing the names of the logical drives on the current computer.

See Also

Environment Class | System Namespace