IconsFromExtension Method

Gets the system-associated icon of a file or an extension.


Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 8.1.0
public static Icon FromExtension(
	string fileOrExtension,
	SystemIconSize size


fileOrExtension  String
A file name (can be a non-existing one) or an extension (with or without a leading dot character) for which the associated icon is about to be retrieved.
size  SystemIconSize
The size of the icon to be retrieved.

Return Value

The system-associated icon of the specified file or extension.


If size is Large and fileOrExtension is an existing file, then the result is usually the same as for the Icon.ExtractAssociatedIcon method.

See Also