Essential C# Reactive Extensions Rx  Suggest an edit

Observing TextChanged event on a TextBox

An observable is created from the TextChanged event of the TextBox. Also any input is only selected if it’s different from the last input and if there was no input within 0.5 seconds. The output in this example is sent to the console.

Observable
     .FromEventPattern(textBoxInput, "TextChanged")
     .Select(s => ((TextBox) s.Sender).Text)
     .Throttle(TimeSpan.FromSeconds(0.5))
     .DistinctUntilChanged()
     .Subscribe(text => Console.WriteLine(text));


Table Of Contents
22 Enum
25 GUID
107 Stream
108 Timers
139 Reactive Extensions Rx
  ↑ ↓ to navigate     ↵ to select     Esc to close