NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BitArray

The BitArray class manages a compact array of bit values. Individual bit values are represented as booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0). The size of a BitArray is controlled by the client; indexing past the end of the BitArray throws an ArgumentException.

The intended use for BitArray is:

if (bitflag->Get(bitindex)) { ... }

public sealed class BitArray 
{
   //Constructors 
 public BitArray (BitArray bits);
 public BitArray (byte[] bytes);
 public BitArray (int length);
 public BitArray (int length, bool defaultValue);
 public BitArray (int[] values);
  
//Methods 
 public virtual BitArray And(BitArray value);
public virtual bool Get(int index);
public virtual int GetLength();
public virtual BitArray Not();
public virtual BitArray Or(BitArray value);
 public virtual void Set(int index, bool value);
 public virtual void SetAll(bool value);
 public virtual void SetLength(int length);
public virtual BitArray Xor(BitArray value);
}