Export (0) Print
Expand All

Environment.WorkingSet Property

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

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

'Declaration
Public Shared ReadOnly Property WorkingSet As Long
'Usage
Dim value As Long

value = Environment.WorkingSet

/** @property */
public static long get_WorkingSet ()

public static function get WorkingSet () : long

Property Value

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

Windows 98, Windows Millennium Edition Platform Note: This property always returns zero.

The following code example displays the size of the working set of the computer running 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
'

// Sample for the Environment.WorkingSet property
import System.*;

class Sample
{
    public static void main(String[] args)
    {
        Console.WriteLine("WorkingSet: {0}", 
            System.Convert.ToString(Environment.get_WorkingSet()));
    } //main
} //Sample

/*
This example produces the following results:

WorkingSet: 5038080
*/

Windows 98, Windows 2000 SP4, Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft