Does anyone know how to set a C# console application's icon in the code (not using project properties in Visual Studio)?
You can change it in the project properties.
See this Stack Overflow article: Is it possible to change a console window's icon from .net?
To summarize right click on your project (not the solution) in Visual Studio and select properties. At the bottom of the "Application" tab there is a section for "Icon and manifest" where you can change the icon.