C# Programming :: Polymorphism
-
Which of the following operators cannot be overloaded?
- true
- false
- new
- ~
- sizeof
-
Which of the following modifier is used when a virtual method is redefined by a derived class?
-
In order for an instance of a derived class to completely take over a class member from a base class, the base class has to declare that member as
-
Which of the following can be declared as a virtual in a class?
- Methods
- Properties
- Events
- Fields
- Static fields
-
Which of the following statements is correct?
-
Which of the following are necessary for Run-time Polymorphism?
- The overridden base method must be virtual, abstract or override.
- Both the override method and the virtual method must have the same access level modifier.
- An override declaration can change the accessibility of the virtual method.
- An abstract inherited property cannot be overridden in a derived class.
- An abstract method is implicity a virtual method.
A.
Only one object can be created from an abstract class.
|
B.
By default methods are virtual.
|
C.
If a derived class does not provide its own version of virtual method then the one in the base class is used.
|
D.
If the method in the derived class is not preceded by override keywords, the compiler will issue a warning and the method will behave as if the override keyword were present.
|
E.
Each derived class does not have its own version of a virtual method.
|