Defines that instances of the provided types are allowed to exist when this definition is asserted using MemAssertion.Assert(MemSnapShot, AssertionsDefinition, AssertionsThread).

Namespace:  SciTech.NetMemProfiler
Assembly:  MemProfiler2 (in MemProfiler2.dll)

Syntax

C#
public void AllowInstances(
	Type[] types
)
Visual Basic
Public Sub AllowInstances ( _
	types As Type() _
)
Visual C++
public:
void AllowInstances(
	array<Type^>^ types
)

Parameters

types
Type: array<System..::..Type>[]()[][]
An array containing the Types of the instances that should be allowed.

Remarks

Including a type in a call to AllowInstances, will override instance restrictions defined using a call to NoInstances(array<Type>[]()[][], Boolean) or NoNewInstances(array<Type>[]()[][], Boolean).

See Also