Monday, November 14, 2022

Try , Catch and finally in C#

  1.  Multiple finally blocks in the same program are not allowed.
  2. The finally block does not contain any return, continue, break statements because it does not allow controls to leave the finally block.
  3. we can use multiple catch block in the same program.
  4. finally always executed in the block.

  5. The main purpose of finally block is to release the system resources.
  6. Can finally block be used without catch ? - Yes.



No comments:

Post a Comment