system.reactive Subscribing/unsubscribing to an observable (IDisposable)

Download system.reactive for free

Example

Subscription returns an IDisposable:

IDisposable subscription = emails.Subscribe(email =>
    Console.WriteLine("Email from {0} to {1}", email.From, email.To));

When you are ready to unsubscribe, simply dispose the subscription:

subscription.Dispose();