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)

public static long WorkingSet { get; }

Property Value

Type: System.Int64
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 example displays the size of the working set of the computer that runs the code example.

// Sample for the Environment.WorkingSet property 
using System;

class Sample 
{
    public static void Main() 
    {
    Console.WriteLine("WorkingSet: {0}", Environment.WorkingSet);
    }
}
/*
This example produces the following results:

WorkingSet: 5038080
*/

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft