✅ Can my Equals(IEnumerable<T>? x, IEnumerable<T>? y) be made much simpler?

You may have any tricks to simplify the following.
public bool Equals(IEnumerable<T>? x, IEnumerable<T>? y)
{
    if (x is null) return y is null;
    if (y is null) return false;
    return x.SequenceEqual(y);
}
Was this page helpful?