CoalesceInternal()

ObjectExt::CoalesceInternal(RT1, F) method

Implementation of ‘??’ operator translation for non-nullable types. Overload for case if RT2 is convertable to RT1.

template<typename RT1,typename RT2,typename F> static std::conditional<std::is_convertible<RT2, RT1>::value, RT1, RT2>::type System::ObjectExt::CoalesceInternal(RT1 value, F func)

Template parameters

ParameterDescription
T0LHS value type.
T1Type of lambda encapsulating RHS expression.

Arguments

ParameterTypeDescription
valueRT1LHS value.
funcFRHS expression.

Return Value

If LHS value is not null, returns LHS, otherwise calculates RHS expression and returns result.

See Also