Interview Questions

An example of a ctype and directcast.

C# Interview Questions and Answers


(Continued from previous question...)

211. An example of a ctype and directcast.

In the preceding example, the run-time type of Q is Double. CType succeeds because Double can be converted to Integer, but DirectCast fails because the run-time type of Q is not already Integer

(Continued on next question...)

Other Interview Questions