I am starting to see these statements, and I am trying to wrap my head in these statements.
if (obj is SomeAuto car) {
If I understand correctly, we basically throw obj into a variable machine, which would be a type of "SomeAuto"?
1) What is the official terminology of this statement?
2) What happens if I want to change the if statement to conditionally execute for a specific reason?
For example, SomeAuto is a base class, and I need only a certain type of car, or I want all SomeAuto, except, perhaps, one specific type.
source share