As Sergey correctly noted, an icon file contains just one icon with possibly multiple images. If you need to create such a file, your best bet is using an existing application (you may find many free tools, just
Google for[
^]). On the other end, if you wish to programmatically create such a file, then you have probably to deal with icon file format. You might start from the
ICO (file format)[
^] Wikipedia page.