Click or drag to resize
DigitalRuneObjectHelperSafeDisposeT Method
Safely disposes the object.

Namespace: DigitalRune
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax
public static void SafeDispose<T>(
	this T obj
)
where T : class

Parameters

obj
Type: T
The object to dispose. Can be .

Type Parameters

T
The type of the object.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The method calls Dispose if the obj is not null and implements the interface IDisposable.
See Also