SafeInvoke()

System::SafeInvoke(T0, T1) function

Implementation of ‘?.’ operator translation.

template<typename T0,typename T1> static auto System::SafeInvoke(T0 expr, T1 func)

Template parameters

ParameterDescription
T0expression type.
T1Type of lambda encapsulating ‘WhenTrue’ expression.

Arguments

ParameterTypeDescription
exprT0expression value.
funcT1‘WhenTrue’ expression bound to functor.

Return Value

If expr value is not null, returns func called with its value as first argument, otherwise returns null.

See Also