예제 #1
0
파일: Test.cs 프로젝트: koralium/Koralium
 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);
 }
예제 #2
0
 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));
 }
예제 #3
0
 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);
 }