title: Filtering strings out of an array
body: <p>I'm trying to design a check on incoming strings for an array, and if the incoming string has a specific starting character it gets skipped over</p>
  
  <p>For example:</p>
  
  <pre><code>;item1
  item2
  item3
  ;item4
  </code></pre>
  
  <p>should be put into array as</p>
  
  <pre><code>item2
  item3
  </code></pre>
  
  <p>I thought I'd try to use a foreach method to skip the line that starts with the identifier, and then in the else append the lines that don't match back into the string array, but it doesn't seem I am able to do this. </p>
  
  <p>Help!</p>
  
  <pre><code>    void Whitelist()
      {
          if (logging == 1)
          {
              FIO._Log("Performing WhiteList func", writer);
          }
          try
          {
              string[] lines = File.ReadAllLines("Whitelist.ini");
              string[] lines2;
              foreach (string line in lines)
              {
                  if (line.StartsWith(";"))
                  {
                      continue;
                  }
                  else
                  {
                      // lines2.append(line) ??
                  }
  
              }
              structs.CustomWhiteList = lines2;
          }
          catch (Exception e)
          {
              MessageBox.Show("Error reading whitelist file." + Environment.NewLine + e.Message);
              FIO._Log("Failed to read whitelist file", writer);
          }
      }
  </code></pre>