title: How to write contents of System.Collections.Specialized.StringCollection to file?
body: <p>I have had no luck searching the obvious places for an answer to why using File.WriteAllLines(); doesn't work when outputting a StringCollection:</p>
  
  <pre><code>static System.Collections.Specialized.StringCollection infectedLog = new System.Collections.Specialized.StringCollection();
  </code></pre>
  
  <p>Omitting code here that has populated infectedLog.......</p>
  
  <pre><code>File.WriteAllLines(@"C:\CustomSearchInfectedFiles.txt", infectedLog);
  </code></pre>
  
  <p>Could anyone either tell me what I am doing wrong, or point me in the direction of an explanation that will please?</p>