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 uint16?
What is disco?
Explain the OOPS concept in C#?
without modifying source code if we compile again, will it be generated MSIL again?
List down the fundamental oop concepts?
Why do we use inheritance in c#?
You have got 1 million parking slots. At a time a parking slot can be free or not. To get next slot easily which data structure to implement?
What are the new features in c# 2.0?
What is the difference between list and arraylist in c#?
What is the difference between iqueryable and ienumerable?
How many types of constructors are there?
Are tuples immutable c#?
Why data types are important in c#?
What is overloading with example?
Which is more efficient for loop or while loop?