public override bool Equals(object obj) { if (obj == null || obj.GetType() != GetType()) { return(false); } if (this == obj) { return(true); } var othre = obj as CacheData; return(DataId.Equals(othre.DataId) && Group.Equals(othre.Group)); }