Yes, we can call
By doing this, we force the
method to be called automatically.
We can call the
method, suppress the
Below is the sample code of the pattern. This is the best way we do clean our unallocated resources and yes not to forget we do not get the hit of running the Garbage collector twice. It will suppress the
method thus avoiding the two trips.
Public Class ClsTesting
Public Overloads Sub Dispose()Implements IDisposable.Dispose
Protected Overrides Sub Finalize()
Hope this may help you. :)