Friday, October 5, 2018

Interview Questions and Answers on Exception handling in C#  ( Part-2 )

Question : Can we use 'return' keyword in catch and finally block?
Answer: Yes, we can use return keyword in catch block but not in finally block, see below example :


 

No comments:

Post a Comment

C# Record type: Something to remember while using record types

  Record in c# provide a concise and expressive way to create immutable data types, record is a keyword in c#, we can use this keyword with ...