Observable.Subscribe<TSource> Method (IEnumerable<TSource>, IObserver<TSource>)

March 22, 2012

Subscribes an observer to an enumerable sequence. Returns an object that can be used to unsubscribe the observer from the enumerable.

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

public static IDisposable Subscribe<TSource>(
	this IEnumerable<TSource> source,
	IObserver<TSource> observer

Type Parameters



Type: System.Collections.Generic.IEnumerable<TSource>
Type: System.IObserver<TSource>

Return Value

Type: System.IDisposable
Returns IDisposable.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<TSource>. When you use instance method syntax to call this method, omit the first parameter.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone