public override bool Equals(object obj) { if (obj is Test t) { return(Name.Equals(t.Name) && TestList.SequenceEqual(t.TestList) && ListInList.SequenceEqual(t.ListInList, new ListEqualityComparer <int>()) && ListOfObject.SequenceEqual(t.ListOfObject) && TestObject.Equals(t.TestObject) && FloatValue.Equals(t.FloatValue) && BoolValue.Equals(t.BoolValue)); } return(false); }
protected bool Equals(ClassWithAllTypes other) { return(CharValue == other.CharValue && ByteValue == other.ByteValue && SByteValue == other.SByteValue && ShortValue == other.ShortValue && UShortValue == other.UShortValue && IntValue == other.IntValue && UIntValue == other.UIntValue && LongValue == other.LongValue && ULongValue == other.ULongValue && FloatValue.Equals(other.FloatValue) && DoubleValue.Equals(other.DoubleValue) && DecimalValue == other.DecimalValue && DateTimeValue.Equals(other.DateTimeValue) && GuidValue.Equals(other.GuidValue) && StringValue.Equals(other.StringValue)); }
public bool Equals(DataModel other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Id == other.Id && StringValue == other.StringValue && DoubleValue.Equals(other.DoubleValue) && FloatValue.Equals(other.FloatValue) && BoolValue == other.BoolValue); }