The type of object to dispose
A reference to the instance for disposal
RemoveAndDispose<T> Method
Dispose an object instance and set the reference to null
Syntax
public static void RemoveAndDispose<T>( 
   T disposer
)
where T: class, IDisposable

Parameters

disposer
A reference to the instance for disposal

Type Parameters

T
The type of object to dispose
Remarks
This method hides any thrown exceptions that might occur during disposal of the object (by design)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also