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

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

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.

3. 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#.

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!