In C#, what is the role of the 'finally' block in a try-catch-finally statement?
A. Executes code regardless of exceptions
B. Catches any exceptions
C. Handles exceptions
D. Terminates the program
Answer: Option A
A. Executes code regardless of exceptions
B. Catches any exceptions
C. Handles exceptions
D. Terminates the program
Answer: Option A
What is the correct syntax to declare a variable in C#?
A. num = int;
B. var num;
C. num int;
D. int num;
What is the purpose of the 'var' keyword in C#?
A. Declares a constant
B. Converts a variable to string
C. Implicitly declares a variable
D. Defines a method
Join The Discussion