Multiple choice technology programming languages

What is the operator that is used to cast up & down the inheritance hierarchy?

  1. Casting

  2. DirectCast

  3. InheritenceCast

  4. LevelCasting

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In VB.NET, DirectCast is used for casting reference types up and down the inheritance hierarchy. It is more efficient than CType when the conversion type is known at compile time because it avoids runtime type checking overhead. Option A is too generic; Options C and D are not valid VB.NET keywords.