Environment.WorkingSet Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the amount of physical memory mapped to the process context.

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

Public Shared ReadOnly Property WorkingSet As Long

Property Value

Type: System.Int64

A 64-bit signed integer containing the number of bytes of physical memory mapped to the process context.


This property always returns zero.

The following example displays the size of the working set of the computer that runs the code example.

' Sample for the Environment.WorkingSet property
Imports System

Class Sample
   Public Shared Sub Main()
      Console.WriteLine("WorkingSet: {0}", Environment.WorkingSet)
   End Sub 'Main
End Class 'Sample
'This example produces the following results:
'WorkingSet: 5038080


for full access to the resource protected by this permission. Associated enumeration: PermissionState.Unrestricted

.NET Framework
Available since 1.1
Return to top