Click or drag to resize

TryCastWorkerBaseTValue, TResultTryExecuteTTarget Method

Tries to cast the value and executes the action if the cast was successful.

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll)
Syntax
protected void TryExecute<TTarget>(
	Func<TTarget, TResult> action
)
where TTarget : class, TValue

Parameters

action
Type: SystemFuncTTarget, TResult
The action.

Type Parameters

TTarget
The type of the target.
See Also