Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
C#’s bool type (aliasing the
System.Boolean type) is a logical value
that can be assigned the literal true
or false.
Although a Boolean value requires only one bit of storage, the
runtime will use one byte of memory, since this is the minimum chunk that
the runtime and processor can efficiently work with. To avoid space inefficiency in the case of arrays, the
Framework provides a BitArray class in
the System.Collections namespace that is
designed to use just one bit per Boolean value.