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.
Add a using directive.
Inherit from the class.
Package the classes in the same solution.

Question 3

What is the .NET class that every other class is derived from?

System
System.Base
System.Object
System.Windows

Question 4

Interface can include:

data members
abstract methods
nonabstract methods
properties
all of the above

Question 5

Using the following declaration, which of the following statements is true?

public class aClass : bClass, IClass

IClass is an interface.
aClass is the derived class.
bClass is the base class.
all of the above
none of the above

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 :

Properties
Abstract methods
Non-abstract methods
All the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!