Question: What is the main difference between the is and as operators?

  1. The is operator checks instance types, while the as operator checks the inherited type.
  2. The is operator checks primitive data types, while the as operator checks the object type.
  3. The as operator checks object type, while the is operator attempts to cast an object to a specific type.
  4. The is operator checks object type, while the as operator attempts to cast an object to a specific type.

Answer: The correct answer of the above question is Option D:The is operator checks object type, while the as operator attempts to cast an object to a specific type.