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

Why is xml called extensible?

0 Answers  


Define multicast c# delegate?

0 Answers  


Is a games console a computer?

0 Answers  


What is a pre-requisite for connection pooling?

2 Answers  


What is a datacontract?

0 Answers  


Why do we need static in c#?

0 Answers  


Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?

0 Answers   Siebel,


How many types of variables are there in c#?

0 Answers  


What is satellite assembly? And steps to create satellite assembly?

0 Answers  


What is single dimensional array in c#?

0 Answers  


Differentiate between method overriding from method overloading with its functionality?

0 Answers   Siebel,


What are jump statements in c#?

0 Answers  


Categories