title: How to remove bytes from a byte array
body: <p>I have a program that has a byte array that varies in size, but is around 2300 bytes. What I want to do is create a function that will create a new byte array, removing all bytes that I pass to it. For example:</p>
  
  <pre><code>byte[] NewArray = RemoveBytes(OldArray,0xFF);
  </code></pre>
  
  <p>I need a function that will remove any bytes equal to 0xFF and return me a new byte array. </p>
  
  <p>Any help would be appreciated. I am using C#, by the way.</p>