BitArray Class

Overview

  • Contains an array of true/false values.
  • Resizable through the Length property.
  • Supports bitwise operations.

Examples

Setting Values

BitArray a = new BitArray(8);
a.SetAll(false);
a[2] = true;

Xor

BitArray a = new BitArray(8);
a.SetAll(false);
a[2] = true;
 
BitArray b = new BitArray(8);
b.SetAll(false);
b[2] = false;
 
BitArray xor = a.Xor(b);
Console.WriteLine(xor[2]);
 
learning/exam70-536/bitarray.txt · Last modified: 2008/09/16 11:31 by david
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki