Environment Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited.
Assembly: mscorlib (in mscorlib.dll)
The Environment type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | CurrentDirectory | Gets the fully qualified path of the current working directory. |
![]() ![]() | CurrentManagedThreadId | Gets a unique identifier for the current managed thread. |
![]() ![]() | HasShutdownStarted | Gets a value indicating whether the common language runtime is shutting down or the current application domain is unloading. |
![]() ![]() | NewLine | Gets the newline string defined for this environment. |
![]() ![]() | OSVersion | Gets an OperatingSystem object that contains the current platform identifier and version number. |
![]() ![]() | ProcessorCount | Gets the number of processors on the current machine. |
![]() ![]() | TickCount | Gets the number of milliseconds elapsed since the system started. |
![]() ![]() | Version | Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime. |
| Name | Description | |
|---|---|---|
![]() ![]() | FailFast(String) | Security Critical. Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message in error reporting to Microsoft. |
![]() ![]() | FailFast(String, Exception) | Security Critical. 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. |
![]() ![]() | GetFolderPath | Gets the path to the system special folder identified by the specified enumeration. |
The following example demonstrates displays a list of information about the current environment.
Note: |
|---|
To run this example, see Building examples that have static TextBlock controls for Windows Phone 8. |



Note: