#Net5 – C#9 logical operators “is” and “is not” are super cool 🆒🆒🆒 — El Bruno

Hi ! In the line of good features, that are also nice to read, the new use of is and is not is a huge improvement in readability. As usual, old school validation for objects and types:

// old school

if(!(testObj is MyClass)) {…}

And now, we can type the validation with some style:

if(testObj is not MyClass) {…}

#Net5 – C#9 logical operators “is” and “is not” are super cool 🆒🆒🆒 — El Bruno