NullableExtensionsClassToStructFuncT, TResult Delegate

Encapsulates a method that maps a reference type to a value type.

Definition

Namespace: Ookii.Common
Assembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
C#
public delegate TResult ClassToStructFunc<T, TResult>(
	T value
)
where T : class
where TResult : struct, new()

Parameters

value  T
The value to map.

Type Parameters

T
The type of the reference type.
TResult
The type of the resulting value type.

Return Value

TResult
The mapped value.

Remarks

This delegate exists because the MapT, TResult(T, NullableExtensionsClassToStructFuncT, TResult) method must have different argument types than the MapT, TResult(NullableT, FuncT, TResult) method.

See Also