Quiz · Inheritance and interfaces · lesson 10 of 10Quiz — is and asHow do the is and as operators differ for runtime type checking?[A]as works with every type, just as is does: o as int returns the number when the object holds an int and 0 otherwise, in the same way that o as Truck returns the reference or null.[B]is performs the cast itself and throws an InvalidCastException whenever the type does not match, while as only returns a bool saying whether the type matches, so after as you still have to write the cast separately.[C]Both are checked by the compiler against the variable's declared type, so for a variable of type Vehicle that holds a Truck object, is Truck gives false and as Truck returns null, all decided before the program even runs.[D]is checks the object's real type and returns a bool; the form x is T t also puts the reference into t. as converts the reference and returns null instead of throwing, so it works only with types that allow null.← BackType checks: is and asNext module →12 · Enums, records and patterns