Tag: block

finally block in C#

Sometimes , it might be necessary to define a block of code that needs to be executed regardless of the exception. For example , you might want to close the database connection or close the file . finally block can usually be used for this purpose.