Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
WorkingSet Property

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

© 2015 Microsoft