var fooRef = new FooRef();
var fooRefEnumerable = Enumerable.Empty<FooRef>();
var fooRefEquality = (fooRef == fooRefEnumerable); //This compiles without any errors
var fooVal = new FooVal();
var fooValEnumerable = Enumerable.Empty<FooVal>();
//Compilation error : Error 1 Operator '==' cannot be applied to operands of type 'FooVal' and 'System.Collections.Generic.IEnumerable<FooVal>'
var fooValEquality = (fooVal == fooValEnumerable);
public class FooRef { }
public struct FooVal { }
Why is it comparing a single object and an IEnumerable valid for RefTypes?