The Finalize() method is similar to the traditional destructor in C++. Unfortunately, Finalize() is not deterministic.
If a lot of objects need to run Finalize(), there will be a high load on the garbage collector, which in turn results in a major degradation in application performance with no measurable positive impact on the garbage collection process.
It is better to use a declared destructor rather than Finalize(). Declaring a destructor (~classname) is more in line with the C++ culture, but it still only calls the Finalize(), so the issue of deterministic destruction is still there.
The C# compiler will actually convert the declared destructor to a call to the Finalize() method. The Finalize() method is called recursively for all of the instances in the inheritance chain, from the most derived to the least derived.
it is better to use the Close() and Dispose() methods.