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

Flip() 공개 메소드

Sets the bit at the specified index to the compliment of its current value.
/// cannot be less than zero. ///
public Flip ( Int32 index ) : void
index System.Int32 /// The index of the bit to flip. ///
리턴 void
		public void Flip(Int32 index) {
			if (index < 0) {
				throw new IndexOutOfRangeException("index cannot be less than zero.");
			}
			Int32 offset = WordIndex(index);
			this.ExpandTo(offset);
			this._bits[offset] ^= 1L << index;
			this.RecalculateWordsInUse();
			this.CheckInvariants();
		}

Same methods

BitSet::Flip ( Int32 from, Int32 to ) : void