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 string interpolation in c#?

965


Which is better javascript or c#?

917


What are the benefits of using generics?

999


How can I develop an application that automatically updates itself from the web?

907


What are the advantages of using assemble language programming?

943


Why delegates are safe in c#?

879


Is xamarin free?

855


Why do I get a security exception when I try to run my c# app?

1005


What is append in c#?

867


Why do we use generics in c#?

983


How do I move from one form to another in c#?

897


Are private members inherited in c#?

973


What is string concatenation?

992


What is the use of console?

889


What is use of FormBoarderStyle Propertie

934