rehansaeed.github.io
rehansaeed.github.io copied to clipboard
[Comment] Reactive Extensions (Rx) - Part 2 - Wrapping C# Events
https://rehansaeed.com/reactive-extensions-part2-wrapping-events/
Davide Cologni commented on 2018-01-02 22:25:55
Hi I found this tutorial very useful, I want suggest to use the dot conditional operator (?.) in the protected method that wrap event wo explicit checking if handler is null in this way:
this.propertyChange?.Invoke(this, new EventArgsBlaBla());
With expression body function is very concise and elegant :^)
Muhammad Rehan Saeed commented on 2018-01-03 10:20:00
Hi I found this tutorial very useful, I want suggest to use the dot conditional operator (?.) in the protected method that wrap event wo explicit checking if handler is null in this way:
this.propertyChange?.Invoke(this, new EventArgsBlaBla());With expression body function is very concise and elegant :^)
I wrote the blog post before the null conditional operator was available but I've now updated the post, thanks!
George Papadopoulos commented on 2019-03-06 21:40:11
Hi there, is it possible to give us an example of how the abstract class NotifyPropertyChanges is used? Thanks In advance.
Muhammad Rehan Saeed commented on 2019-03-08 10:02:44
Hi there, is it possible to give us an example of how the abstract class
NotifyPropertyChangesis used? Thanks In advance.
I wrote a series of blog posts you can look at here.