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
How to use reflection to call generic method?
What is difference between throw and throws in c#?
Why hashtable is thread safe in c#?
What are async and await?
How many bytes is an int in c#?
What is icomparable in c#?
What do u mean by delegation of authority?
What does public mean in c#?
Which of the following operations can you not perform on an ado.net dataset?
What is a view? What is the use of it?
Why do we use dataset in c#?
Is null == null c#?
Is stringbuilder thread safe c#?
Can abstract class be instantiated c#?
Name the connections does microsoft sql server support?