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

And() public method

Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each bit in it has the value true if and only if it both initially had the value true and the corresponding bit in the specified bit set also had the value true.
/// cannot be null. ///
public And ( BitSet bs ) : void
bs BitSet /// A bit set. ///
return void
		public void And(BitSet bs) {
			if (bs == null) {
				throw new ArgumentNullException("bs");
			}

			if (this == bs) {
				return;
			}

			while (this._wordsInUse > bs._wordsInUse) {
				this._bits[--this._wordsInUse] = 0;
			}

			for (Int32 i = 0; i < this._wordsInUse; i++) {
				this._bits[i] &= bs._bits[i];
			}

			this.RecalculateWordsInUse();
			this.CheckInvariants();
		}