ServicedComponent.CanBePooled Method ()

 
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.

This method is called by the infrastructure before the object is put back into the pool. Override this method to vote on whether the object is put back into the pool.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

protected internal virtual bool CanBePooled()

Return Value

Type: System.Boolean

true if the serviced component can be pooled; otherwise, false.

The following code example demonstrates the use of this method.

// This object can be pooled.
protected override bool CanBePooled()
{
    return(true);
}

.NET Framework
Available since 1.1
Return to top
Show: