Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created October 13, 2015 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpodwysocki/995b65e5d57b7d718648 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/995b65e5d57b7d718648 to your computer and use it in GitHub Desktop.
Zip fun with Rx.NET
Observable.Zip(
Observable.Interval(TimeSpan.FromTicks(100)).Take(3),
Observable.Interval(TimeSpan.FromTicks(100)).Take(4),
Observable.Interval(TimeSpan.FromTicks(100)).Do(x => Console.WriteLine("third")),
Observable.Interval(TimeSpan.FromTicks(100)).Do(x => Console.WriteLine("fourth"))
).Subscribe(xs => { foreach (var x in xs) { Console.Write(x); } }, () => Console.WriteLine("done"));
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment