#91 Add Observer to Object

You know how to create an observer in your class definition, but you can also add an observer to an object, here is an example:

This is pretty much an event listener.  Just remember this will only fire for that one instance of the object.  So if you had another myProject2 object instance, the observer will not fire.

Here is an example.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu