public static bool AreEqual(Toilet[] A, Toilet[] B) { if (A == null) return B == null; if (B == null) return false; if (A.Length != B.Length) return false; for (int i = 0; i < A.Length; i++) if (!A [i].IsEqual (B [i])) return false; return true; }
[FieldOffset(13)] public long LastUsedTime;// U should not to use (DateTime) type. Its impolssinle to serialize this type by usual Marshaling. public bool IsEqual(Toilet toil) { return toil.InUse == InUse && toil.Volume == Volume && toil.LastUsedTime == LastUsedTime && toil.TimesUsed == TimesUsed; }