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

How to use reflection to call generic method?

848


What is difference between throw and throws in c#?

816


Why hashtable is thread safe in c#?

932


What are async and await?

902


How many bytes is an int in c#?

882


What is icomparable in c#?

909


What do u mean by delegation of authority?

887


What does public mean in c#?

874


Which of the following operations can you not perform on an ado.net dataset?

925


What is a view? What is the use of it?

1018


Why do we use dataset in c#?

909


Is null == null c#?

838


Is stringbuilder thread safe c#?

820


Can abstract class be instantiated c#?

888


Name the connections does microsoft sql server support?

872