Method SafeDispose
SafeDispose<T>(ref T?)
Safely disposes specified object which supports IDisposable interface.
public static void SafeDispose<T>(ref T? disposable) where T : IDisposable
Parameters
disposable
TObject to dispose.
Type Parameters
T
Type of the object.