Export (0) Print
Expand All

HandleCollector Constructor (String, Int32, Int32)

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.

ExceptionCondition
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.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1
Show:
© 2015 Microsoft