public override bool Equals(System.Object obj) { if (obj == null) { return(false); } CardCollection othercardcollection = obj as CardCollection; if (othercardcollection == null) { return(false); } if (owner.owner.GetType() != othercardcollection.owner.owner.GetType()) { return(false); } if (owner.owner.id != othercardcollection.owner.owner.id) { return(false); } if (type != othercardcollection.type) { return(false); } if (!cards.SequenceEqual(othercardcollection.cards)) { return(false); } return(true); }