public override bool Equals(object obj) { if (obj.GetType() == typeof(BiffRecord) || obj.GetType().IsSubclassOf(typeof(BiffRecord))) { BiffRecord br = (BiffRecord)obj; if (br.Id == Id && br.Length == Length) { byte[] recordBytes = br.GetBytes(); return(recordBytes.SequenceEqual(GetBytes())); } } return(false); }