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 are callback methods in c#?
Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?
Can we have two main methods in c#?
What is Assembly. and Describe type of assembly. why most developer happy with private assembly.
What is the full form of GAC? Explain its uses?
What is a delegate in c#?
How does substring work in c#?
What is a console device?
What is whitespace in c#?
Give examples for reference types?
What is a long in c#?
How to exclude a property from xml serialization?
What is application object in c#?
how to insert the data from the grid view to database table though button click.pls send the answer to mail id suri1319@gmail.com
What is difference between property and variable in c#?