Set - 8

Question 16 :

Can multiple catch blocks be executed for a single try statement?

Answer :

No. Once the proper catch block processed, control is transferred to the finally block (if there are any).

Question 17 :

Explain the three services model commonly know as a three-tier application.

Answer :

Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).

Question 18 :

What is the syntax to inherit from a class in C#?

Answer :

Place a colon and then the name of the base class.

class MyNewClass : MyBaseClass


Question 19 :

Can you prevent your class from being inherited by another class?

Answer :

Yes. The keyword "sealed" will prevent the class from being inherited.

Question 20 :

Can you allow a class to be inherited, but prevent the method from being over-ridden?

Answer :

Yes. Just leave the class public and make the method sealed.