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 string interpolation in c#?
Which is better javascript or c#?
What are the benefits of using generics?
How can I develop an application that automatically updates itself from the web?
What are the advantages of using assemble language programming?
Why delegates are safe in c#?
Is xamarin free?
Why do I get a security exception when I try to run my c# app?
What is append in c#?
Why do we use generics in c#?
How do I move from one form to another in c#?
Are private members inherited in c#?
What is string concatenation?
What is the use of console?
What is use of FormBoarderStyle Propertie