DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: The perfect non-null test

Collapse
monkey0506 profile image
Michael Rittenhouse

So, now I have this.

public static bool operator ==(Widget? lhs, Widget? rhs)
{
Β Β Β Β return lhs is object ? lhs.Equals(rhs) : rhs is null;
}

I kind of like it. :)