Interview Questions

ctype(123.34,integer) - should it throw an error? Why or why not?

C# Interview Questions and Answers


(Continued from previous question...)

212. ctype(123.34,integer) - should it throw an error? Why or why not?

Answer1
It would work fine. As the runtime type of 123.34 would be double, and Double can be converted to Integer.

Answer2
the ctype(123.34,integer) will work fine no errors

(Continued on next question...)

Other Interview Questions