Example #1
0
 public bool Equals(TestObject other)
 {
     return(IntValue == other.IntValue &&
            (NullableIntValue == null && other.NullableIntValue == null) || NullableIntValue.Equals(other.NullableIntValue) &&
            DecimalValue == other.DecimalValue &&
            (NullableDecimalValue == null && other.NullableDecimalValue == null) || NullableDecimalValue.Equals(other.NullableDecimalValue) &&
            (StringValue == null && other.StringValue == null) || StringValue.Equals(other.StringValue) &&
            DateValue == other.DateValue &&
            (NullableDateValue == null && other.NullableDateValue == null) || NullableDateValue.Equals(other.NullableDateValue) &&
            TimeSpanValue == other.TimeSpanValue &&
            (NullableDateValue == null && other.NullableDateValue == null) || NullableDateValue.Equals(other.NullableDateValue) &&
            (IntArray == null && other.IntArray == null) || IntArray.SequenceEqual(other.IntArray) &&
            (IntCollection == null && other.IntCollection == null) || IntCollection.SequenceEqual(other.IntCollection) &&
            GuidValue == other.GuidValue &&
            (NullableGuidValue == null && other.NullableGuidValue == null) || NullableGuidValue.Equals(other.NullableGuidValue)
            );
 }