title: C# - Save Icon of executable files
body: <p>I written a program that save icon of executable files. when I get icon of executable files by ExtractAssociatedIcon method and save it, the quality of output icon be <strong>low quality</strong>. what can I Do?</p>
  
  <pre><code>var ico = Icon.ExtractAssociatedIcon(@"c:/test.exe");
  FileStream stream = new System.IO.FileStream(string.Format("{0}{1}", Path.GetTempPath(), "icon" + counter + ".ico"), System.IO.FileMode.Create);
  ico.Save(stream);
  stream.Flush();
  stream.Close();
  </code></pre>