Differentiate IS and AS operators?

 Posted by Kmandapalli on 2/5/2014 | Category: C# Interview questions | Views: 2126 | Points: 40

The IS operator checks whether an object is compatible with a given type, and the result of evaluation will be boolean: true/false and also the IS operator will never throw an exception.
The AS operator is like a cast except that it yields NULL on conversion failure instead of returning an exception.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response