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...


Difference between direct type casting and using "as" keyword?



Difference between direct type casting and using "as" keyword?..

Answer / amitabh dubey

Explicit cast throws an InvalidCastException if the object
can not be casted. you have to
Keep the casting under try / catch block to handle the
exception.
Instead you can use as operator which return null if it
can not cast the object.

Is This Answer Correct ?    25 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Which is faster list or dictionary in c#?

0 Answers  


Tell us something about static linking and dynamic linking?

0 Answers   C DAC,


Is there a way of specifying which block or loop to break out of when working with nested loops?

0 Answers  


What all details the assembly manifest will contain?

0 Answers  


What is use of singleton class in c#?

0 Answers  


Can you create sealed abstract class in c#?

0 Answers  


What’s thread.sleep() in threading ?

0 Answers  


What is xslt in c#?

0 Answers  


What is the resgen.exe tool used for?

0 Answers  


how to change a value of particular cell in a data grid

3 Answers  


How to override a function in c#?

0 Answers  


what is a structure in c#

3 Answers   Cognizant,


Categories