Dan Rigby

Dan Rigby DanRigby

Niner since 2009


  • TWC9: New Team Members, Win8, C++, SQL 2012, Cloud Numerics

    INotifyPropertyChanged, the Anders Hejlsberg Way:

    Good feedback and an interesting discussion.

    In terms of visual density, this was partly due to the fact that Anders codes using K&R style bracing instead of Allman, as well as the extra code he uses to properly avoid the race condition that exists in the MSDN example. I updated the blog post to use Allman style for both.

    The other thing I did want to point out was that there is at least one other advantage besides just reductions in raw lines of boiler plate code in property setter, which is that it sets up a Pit of Success for properly implementing INotifyPropertyChanged in subclasses.

    I work on a very large WPF/C# enterprise project at the moment and there are literally *thousands* of incorrectly implemented properties in the application that need to be fixed to properly check for inequality before setting the field and raising the event.

    I appreciate the discussion even if you don't agree with the post. (: