Week 4 Blog Post

  1. Can multiple catch blocks be executed?

Yes you can have multiple catch blocks with try statement. You start with catching specific exceptions and then in the last block you may catch base Exception . Only one of the catch block will handle your exception.

  1. What is an interface?

In its most common form, an interface is a group of related methods with empty bodies.

  1. What is an enum?

Enum, in C#, is a keyword that represents a value type for declaring a set of named constants.

An enum helps to define a series of related integral constants that represent special values within a module of code.

  1. What is the difference between continue and break?

Break statement breaks the loop/switch whereas continue skip the execution of current iteration only and it does not break the loop/switch i.e. it passes the control to the next iteration of the enclosing while loop, do while loop, for loop or for each statement in which it appears