HandleCollector Constructor (String, Int32, Int32)

 
System_CAPS_noteNote

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

Initializes a new instance of the HandleCollector class using a name, a threshold at which to begin handle collection, and a threshold at which handle collection must occur.

Namespace:   System.Runtime.InteropServices
Assembly:  System (in System.dll)

public HandleCollector(
	string name,
	int initialThreshold,
	int maximumThreshold
)

Parameters

name
Type: System.String

A name for the collector. This parameter allows you to name collectors that track handle types separately.

initialThreshold
Type: System.Int32

A value that specifies the point at which collections should begin.

maximumThreshold
Type: System.Int32

A value that specifies the point at which collections must occur. This should be set to the maximum number of available handles.

Exception Condition
ArgumentOutOfRangeException

The initialThreshold parameter is less than 0.

-or-

The maximumThreshold parameter is less than 0.

ArgumentException

The maximumThreshold parameter is less than the initialThreshold parameter.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: