This documentation is archived and is not being maintained.

Environment Properties

The properties of the Environment class are listed here. For a complete list of Environment class members, see the Environment Members topic.

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.

See Also

Environment Class | System Namespace

Show: