CyrusBuilt.MonoPi.BitSet.Or C# (CSharp) 메소드

Or() 공개 메소드

Performs a logical OR of this bit set with the specified bit set. This bit set is modified so that a bit in it has the value true if and only if either it already had the value true or the corresponding bit in the specified bit set has the value true.
/// cannot be null. ///
public Or ( BitSet bs ) : void
bs BitSet /// A bit set. ///
리턴 void
		public void Or(BitSet bs) {
			if (bs == null) {
				throw new ArgumentNullException("bs");
			}

			if (this == bs) {
				return;
			}

			Int32 wordsInCommon = Math.Min(this._wordsInUse, bs._wordsInUse);
			if (this._wordsInUse < bs._wordsInUse) {
				this.EnsureCapacity(bs._wordsInUse);
				this._wordsInUse = bs._wordsInUse;
			}

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

			if (wordsInCommon < bs._wordsInUse) {
				Array.Copy(bs._bits, wordsInCommon, this._bits, wordsInCommon, this._wordsInUse - wordsInCommon);
			}
			this.CheckInvariants();
		}