/// <summary>Compare this this <see cref="ITag"/> to the given object</summary> /// <param name="other">The object to compare to</param> /// <returns>Compare this this <see cref="ITag"/> to the given object</returns> public Boolean Equals(NBTTagList other) { return(other != null && EqualityComparer <String> .Default.Equals(this._Name, other._Name) && EqualityComparer <NBTTagType> .Default.Equals(this._SubType, other._SubType) && Comparison.Comparer.Equals <ITag>(this._Tags, other._Tags)); }
/// <summary>Create a clone of this this <see cref="ITag"/></summary> /// <returns>Create a clone of this this <see cref="ITag"/></returns> public override ITag Clone() { var Out = new NBTTagList(this.SubType, this._Tags.Count) { Name = this.Name }; Int32 Count = this._Tags.Count; for (Int32 I = 0; I < Count; I++) { Out.Add(this._Tags[I].Clone()); } return(Out); }