+ 5
What is the difference between “finalize” and “finally” methods in C#?
2 ответов
+ 5
good, thanks bro
+ 1
Hi
Base on C# Corner post:
final – constant declaration.
finally – The finally block always executes when the try block exits, except System.exit(0) call. This ensures that the finally block is executed even if an unexpected exception occurs.
finalize() – method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state.
http://www.c-sharpcorner.com/forums/final-finally-and-finalize