Click or drag to resize

MaybeTReturnTTarget Method (FuncT, TTarget)

Returns the value extracted from the specified selector if the inner value is not null, else returns default(TTarget).

[CanBeNull]

Namespace:  TomsToolbox.Core
Assembly:  TomsToolbox.Core (in TomsToolbox.Core.dll) Version: 1.0.75.0
Syntax
public TTarget Return<TTarget>(
	Func<T, TTarget> selector
)

Parameters

selector
Type: SystemFuncT, TTarget
The selector.

[NotNull]

Type Parameters

TTarget
The type of the target.

Return Value

Type: TTarget
The value extracted from the specified selector if the inner value is not null, else default(TTarget).
See Also