public bool Equals(ComplexObject aComplexObject) { bool e1 = _isDisposed == aComplexObject._isDisposed; bool e2 = _constField == aComplexObject._constField; bool e3 = listOfStrings.AsEnumerable().SequenceEqual(aComplexObject.listOfStrings); bool e4 = TestClassNoSetter.Equals(aComplexObject.TestClassNoSetter); bool e5 = _anotherTestClass.Equals(aComplexObject._anotherTestClass); return(e1 && e2 && e3 && e4 && e5); }
public bool Equals(ComplexObject other) { var e1 = _isDisposed == other?._isDisposed; var e2 = _constField == other?._constField; var e3 = ListOfStrings.AsEnumerable().SequenceEqual(other?.ListOfStrings); var e4 = TestClassNoSetter.Equals(other?.TestClassNoSetter); var e5 = _anotherTestClass.Equals(other?._anotherTestClass); return(e1 && e2 && e3 && e4 && e5); }