Interfaces Quiz

Below are the answers to the Interfaces Quiz, along with a brief discussion.

1. interface.

2. public. You can't explicitly choose an accessibility level for interface members. They must always be public. However, you can make an interface internal and make it only usable within the containing assembly.

3. False. All members of an implemented interface must be included in your class. Technically, an abstract class can leave the interface member unimplemented if it is left as an abstract method.

4. True. A type that implements an interface can add anything else it wants to the class, beyond what the interface requires.

5. False. C# specifically prohibits multiple base classes ("multiple inheritance").

6. True. A class can implement any number of interfaces, plus a single base class.