Cuemon .NET Framework
TernaryIf<TResult>(Boolean,Doer<TResult>,Doer<TResult>) Method

The type of the result.
When true, the firstExpression is invoked and becomes the result; when false, the secondExpression is invoked and becomes the result.
The function delegate that is invoked when condition is true.
The function delegate that is invoked when condition is false.
Returns one of two values depending on the value of condition.
Syntax
'Declaration
 
Public Overloads Shared Function TernaryIf(Of TResult)( _
   ByVal condition As Boolean, _
   ByVal firstExpression As Cuemon.Doer(Of TResult), _
   ByVal secondExpression As Cuemon.Doer(Of TResult) _
) As TResult
public static TResult TernaryIf<TResult>( 
   bool condition,
   Cuemon.Doer<TResult> firstExpression,
   Cuemon.Doer<TResult> secondExpression
)

Parameters

condition
When true, the firstExpression is invoked and becomes the result; when false, the secondExpression is invoked and becomes the result.
firstExpression
The function delegate that is invoked when condition is true.
secondExpression
The function delegate that is invoked when condition is false.

Type Parameters

TResult
The type of the result.

Return Value

The result of either function delegate firstExpression or function delegate secondExpression.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Condition Class
Condition Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback