Set - 5

Question 16 :

Can you declare an override method to be static if the original method is not static?

Answer :

No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is changed to keyword override)


Question 17 :

What are the different ways a method can be overloaded?

Answer :

Different parameter data types, different number of parameters, different order of parameters.


Question 18 :

If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

Answer :

Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.


Question 19 :

What's a delegate?

Answer :

A delegate object encapsulates a reference to a method.


Question 20 :

What's a multicast delegate?

Answer :

A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.