Icon Constructor (Type, String)
Initializes a new instance of the Icon class from a resource in the specified assembly.
Assembly: System.Drawing (in System.Drawing.dll)
An icon specified by resource cannot be found in the assembly that contains the specified type.
This constructor creates an Icon from a resource with the name specified by the resource parameter in the assembly that contains the type specified by the type parameter.
This constructor combines the namespace of the given type together with the string name of the resource and looks for a match in the assembly manifest. For example you can pass in the Control type and Error.ico to this constructor, and it looks for a resource that is named System.Windows.Forms.Error.ico.
The following code example demonstrates how to use the Icon constructor. To run this example, paste the code into a Windows Form and handle the form's Paint event. Call the ConstructAnIconFromAType method from the Paint event handler, passing e as EventArgs.