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 |
What is platform independence"?
What does the keyword virtual mean in the method definition?
HOW to Develope the CRUD(create,read,update,delete) FORM IN WINDOWS form by using c# only
0 Answers Petranics Solutions,
Why use a singleton instead of static methods?
What is dll in c#?
What is the boxing and unboxing in c#?
explain synchronous and asynchronous in C#
3 Answers AxSys, Mastek, Synechron,
How we free the memory in C#.NET.
How to assign default value to nullable types? Did nested nullable types are allowed
What are the Types of compatabilities and explain them
Explain the process of Serialization?
WHICH IS THE BEST BOOK FOR A BEGINNER TO LEARN AP.NET 3.5, C#.NET & ALL THE FEATURES OF VISUAL STUDIO2008? WHAT ARE THE CERTIFICATIONS IN THIS FIELD? WHICH IS BEST BOOK FOR CLAERING CERTIFICATION EXAM? PLZ HELP ME YAAR