title: Converting a boolean array into a hexadecimal number
body: <p>Is there an easy way to convert an array of boolean values into 8-bit hexadecimal equivlents? For example, if I have</p>
  
  <pre><code> bool[] BoolArray = new bool[] { true,false,true,true,false,false,false,true };
  </code></pre>
  
  <p>If true values=1 and false values=0 then I'd like a method or function that would convert the above array to 0xB1 (10110001).</p>
  
  <p>Does there exist such a function or method to do this? I am using C#, by the way.</p>