title: .NET char array comparison
body: <p>I have the following c# method to get a valid file name out of a proposed name:</p>
  
  <pre><code>public static string GetValidFilename(string fileNameCandidate)
  {
      var invalids = System.IO.Path.GetInvalidFileNameChars();
      var _name = fileNameCandidate.ToCharArray();
      var validName = _name.Except(invalids).ToArray();
      return new string(validName);
  }
  </code></pre>
  
  <p>What I expected was the original name with any invalid characters from invalids removed.  However, what I get is original name with invalid filename characters and others removed.<br>
  For example, if I called the method with "ems:almcc_srr_view" as input parameter, I expected "emsalmcc_srr_view as output.  What I get is "emsalc_rviw" as output.   What did I  miss? </p>