示例#1
0
 public bool Equals(TestClass other)
 {
     return(((TestString == other.TestString) && (TestBytes == null) && (other.TestBytes == null)) ||
            ((TestBytes != null) && (other.TestBytes != null) &&
             TestBytes.SequenceEqual(other.TestBytes) &&
             (TestInt == other.TestInt) &&
             (TestDateTime == other.TestDateTime) && (TestClassInstance == null) &&
             (other.TestClassInstance == null)) ||
            ((TestClassInstance != null) && (other.TestClassInstance != null) &&
             TestClassInstance.Equals(other.TestClassInstance) &&
             (TestBool == other.TestBool)));
 }
示例#2
0
 public bool Equals(TestClass other)
 {
     return(TestString == other.TestString && TestBytes == null && other.TestBytes == null ||
            TestBytes != null && other.TestBytes != null &&
            TestBytes.SequenceEqual(other.TestBytes) &&
            TestInt == other.TestInt &&
            TestDateTime == other.TestDateTime && TestClassInstance == null &&
            other.TestClassInstance == null ||
            TestClassInstance != null && other.TestClassInstance != null &&
            TestClassInstance.Equals(other.TestClassInstance) &&
            TestBool == other.TestBool);
 }