title: how to set console application icon programmatically in c#
body: <p>I'm new to C# &amp; got requirement like </p>
  
  <blockquote>
    <p>need to change the default console application icon programmatically
    [also is it possible to change during compile time]. </p>
  </blockquote>
  
  <p>I tried with Project -> Properties -> Application -> Icon of my solution in Visual Studio &amp; its working fine.</p>
  
  <p>Also able to set Form icon with the following code </p>
  
  <blockquote>
    <p>this.Icon = new System.Drawing.Icon(@"Icon.png");</p>
  </blockquote>
  
  <p>but the thing is i need to change the icon via code. </p>
  
  <p>Help me out. </p>