C# Assert.AreNotEqual versus Equals
问题 While trying to verify to myself, that C# Equals for IEnumerables is a reference equals, I found something odd. With the following setup in NUnit var a = (IEnumerable<string>)(new[] { "one", "two" }); var b = (IEnumerable<string>)(new[] { "one", "two" }); this test Assert.IsFalse(a.Equals(b)); passes, while this test Assert.AreNotEqual(a, b); doesn't. Can anybody explain why? Edit: Thanks for the answers. I just read the documentation for NUnit, and it says the same thing, that AreEqual and