Click or drag to resize

IconUtilitiesUseAsIconT Method (Bitmap, FuncIcon, T)

Uses the bitmap as an Icon. Ensures allocated resources will be freed.

Namespace:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
public static T UseAsIcon<T>(
	this Bitmap bitmap,
	Func<Icon, T> func
)

Parameters

bitmap
Type: System.DrawingBitmap
The bitmap.
func
Type: SystemFuncIcon, T
The function.

Type Parameters

T
The returned value type.

Return Value

Type: T
The returned value from the function call.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Bitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionaction is null.
See Also