What is difference between "is" and "as" keyword in C#?

What is difference between "is" and "as" keyword in C#?

Giribabu
Views: 1381 | Community Opinion: 1

Tags..  C# Interview  C# Tutorial

Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 
hehe Said..

is
Checks if an object is compatible with a given type.
as
The as operator is used to perform conversions between compatible reference types.
The as operator is like a cast operation. However, if the conversion is not possible, as returns null instead of raising an exception.






What do you think? Add your opinion/answer
*Name
*your opinion/answer: