Examveda

In C#, what is the purpose of the try block in exception handling?

A. To catch an exception

B. To execute code that must always run

C. To clean up resources

D. To enclose the code that might throw an exception

Answer: Option D


Join The Discussion

Related Questions on Exception Handling in C Sharp