Share via


Observable.If<TResult> Method

Namespace:  Microsoft.Phone.Reactive
Assembly:  Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)

Syntax

'Declaration
Public Shared Function If(Of TResult) ( _
    condition As Func(Of Boolean), _
    thenSource As IObservable(Of TResult), _
    elseSource As IObservable(Of TResult) _
) As IObservable(Of TResult)
public static IObservable<TResult> If<TResult>(
    Func<bool> condition,
    IObservable<TResult> thenSource,
    IObservable<TResult> elseSource
)
public:
generic<typename TResult>
static IObservable<TResult>^ If(
    Func<bool>^ condition, 
    IObservable<TResult>^ thenSource, 
    IObservable<TResult>^ elseSource
)
static member If : 
        condition:Func<bool> * 
        thenSource:IObservable<'TResult> * 
        elseSource:IObservable<'TResult> -> IObservable<'TResult> 

Type Parameters

  • TResult

Parameters

Return Value

Type: System.IObservable<TResult>

Version Information

.NET for Windows Phone apps

Supported in: Windows Phone 8, Silverlight 8.1

.NET Framework Security

See Also

Reference

Observable Class

Microsoft.Phone.Reactive Namespace