April 2002
Beginner
413 pages
10h 46m
English
| 1: | In what cases would you use interfaces as opposed to regular class inheritance? Why would you use class inheritance instead of interfaces? |
| A1: | One of the biggest distinctions that arises is that of inheritance. If you have a group of unrelated classes that need to share a common convention, such as a certain protocol, you should use interfaces. However, in order to maintain an “is-a” relationship among objects as you progress up and down an inheritance hierarchy, you should use classes. |
| 2: | Can you add an implementation for any of the .NET Framework interfaces? |
| A2: | Yes, interfaces always have a public access specifier. |
| 3: | Can an interface contain private or protected methods and/or properties? |
| A3: | No, an interface can only contain public ... |
Read now
Unlock full access