+ 5

What is the difference between “finalize” and “finally” methods in C#?

6th Feb 2017, 10:55 PM
Yassine Farhi
Yassine Farhi - avatar
2 ответов
+ 5
good, thanks bro
16th Feb 2017, 10:11 PM
Yassine Farhi
Yassine Farhi - avatar
+ 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
15th Feb 2017, 5:51 PM
Seyed Arman Fatemi
Seyed Arman Fatemi - avatar