 | TryCastWorkerBaseTValue, TResultTryExecuteTTarget Method |
Tries to cast the value and executes the action if the cast was successful.
Namespace: TomsToolbox.DesktopAssembly: TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntaxprotected void TryExecute<TTarget>(
Func<TTarget, TResult> action
)
where TTarget : class, TValue
Protected Sub TryExecute(Of TTarget As {Class, TValue}) (
action As Func(Of TTarget, TResult)
)
Parameters
- action FuncTTarget, TResult
- The action.
Type Parameters
- TTarget
- The type of the target.
See Also