Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is uint16?

964


What is disco?

979


Explain the OOPS concept in C#?

1015


without modifying source code if we compile again, will it be generated MSIL again?

974


List down the fundamental oop concepts?

969


Why do we use inheritance in c#?

952


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?

1122


What are the new features in c# 2.0?

1029


What is the difference between list and arraylist in c#?

913


What is the difference between iqueryable and ienumerable?

1022


How many types of constructors are there?

919


Are tuples immutable c#?

967


Why data types are important in c#?

977


What is overloading with example?

964


Which is more efficient for loop or while loop?

926