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
disposableTObject to dispose.
Type Parameters
TType of the object.