[]
Safely dispose a referencem if not null, and set it to null after dispose.
public static void Dispose<T>(ref T comObject) where T : class, IDisposable
Type | Name | Description |
---|---|---|
T | comObject | Object to dispose. |
Name | Description |
---|---|
T | The type of COM interface to dispose. |
The reference will be set to null after dispose.