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.

Win98WinMe

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
*/

EnvironmentPermission

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft