CyrusBuilt.MonoPi.BitSet.Equals C# (CSharp) Method

Equals() public method

Determines whether the specified System.Object is equal to the current CyrusBuilt.MonoPi.BitSet.
public Equals ( object obj ) : bool
obj object /// The to compare with the current . ///
return bool
		public override bool Equals(object obj) {
			if (obj == null) {
				return false;
			}

			BitSet bs = obj as BitSet;
			if (bs == null) {
				return false;
			}

			this.CheckInvariants();
			bs.CheckInvariants();

			if (this._wordsInUse != bs._wordsInUse) {
				return false;
			}

			Boolean result = true;
			for (Int32 i = 0; i < this._wordsInUse; i++) {
				if (this._bits[i] != bs._bits[i]) {
					result = false;
					break;
				}
			}
			return result;
		}