|
CommonIIfT Method
|
Returns one of two strongly-typed objects.
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax public static T IIf<T>(
bool expression,
T truePart,
T falsePart
)
Public Shared Function IIf(Of T) (
expression As Boolean,
truePart As T,
falsePart As T
) As T
public:
generic<typename T>
static T IIf(
bool expression,
T truePart,
T falsePart
)
static member IIf :
expression : bool *
truePart : 'T *
falsePart : 'T -> 'T
JavaScript does not support generic types or methods.
View SourceParameters
- expression Boolean
- The expression you want to evaluate.
- truePart T
- Returned if expression evaluates to True.
- falsePart T
- Returned if expression evaluates to False.
Type Parameters
- T
- Return type used for immediate expression
Return Value
TOne of two objects, depending on the evaluation of given expression.
Remarks This function acts as a strongly-typed immediate if (a.k.a. inline if).
It is expected that this function will only be used in languages that do not support ?: conditional operations, e.g., Visual Basic.NET.
In Visual Basic this function can be used as a strongly-typed IIf replacement by specifying "Imports GSF.Common".
See Also