Question: Question 1 If a method is marked as protected internal, who can access it? Classes that are both in the same assembly and derived from
Question 1
If a method is marked as protected internal, who can access it?
| | Classes that are both in the same assembly and derived from the declaring class. |
| | Only methods that are in the same class as the method in question. |
| | Internal methods can only be called using reflection. |
| | Classes within the same assembly, and classes derived from the declaring class |
Question 2
To avoid having to use fully qualified referenced classes, you could:
| | Add a reference to the class. |
| | Add an import statement for the class. |
| | Package the classes in the same solution. |
Question 3
What is the .NET class that every other class is derived from?
Question 4
Interface can include:
Question 5
Using the following declaration, which of the following statements is true?
public class aClass : bClass, IClass
| | aClass is the derived class. |
| | bClass is the base class. |
Question 6
If two classes of the same name occur in two different namespaces and both namespaces are used (included) what must be done when using the classes?
| | Just use the name of the class. The C# compiler will figure out by the context which is the correct class to use |
| | Provide a fully qualified path to the class that includes the name space and the name of the class. |
| | Right click on the class name in the code and select the correct class from the popup menu that appears. |
| | It is not possible to have two classes that are named the same thing in C#. |
Question 7
If a method of a class is protected which of the following is true?
| | The method cannot be used. |
| | The method can only be used on an instance of an object. |
| | The method must be overridden to be used. |
| | The method can only be accessed in the class or a subclass. |
Question 8
For a method of a class to be overridden in a subclass which of the following must occur.
| | The method must be declared as virtual . |
| | The method must be declared as public . |
| | The method must be declared as do override . |
| | The method must be static. |
Question 9
In List what is the purpose of ?
| | To indicate the total number of items the list can hold. |
| | To indicate the method that is used to manipulate the list. |
| | To indicate the type of data the list can hold. |
| | To indicate the time interval between garbage collections on the list. |
Question 10
Abstract class can include :