/win32icon:filename
where:
The /win32icon option inserts a .ico file in the output file, which gives the output file the desired appearance in the Windows Explorer. A .ico file can be created with the Resource Compiler. The Resource Compiler is invoked when you compile a Visual C++ program; a .ico file is created from the .rc file.
See /linkresource (to reference) or /resource (to attach) a NGWS resource file. See /win32res to import a .res file.
Compile in.cs
and attach a .ico file rf.ico
to produce in.exe
:
csc /win32icon:rf.ico in.cs