directcast(123.34,integer) - should it throw an error? Why
or why not?
Answer Posted / debasis sengupta
directcast(123.34,integer) would throw an InvalidCast
exception as the runtime type since it requires the run-
time type of an object variable to be same as the specified
type. In this case runtime type of 123.34 (double) doesn?t
match with integer.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a shared assembly?
What is parsing?
Is null empty or whitespace c#?
What is the difference between read and readline in c#?
What is selector c#?
What is an int c#?
Can we create extension method for interface?
What is an enumerator c#?
What is windows application in c#?
What are the Types of assemblies that can be created in dotnet
What are strings in c#?
Define thread? Explain about multithreading?
what is partial assembly reference
Can a method be sealed in c#?
What is func delegate in c#?