This article describes the Observer design pattern. This is a behavioral design pattern, a category of design pattern used by software engineers, when writing computer programs.
The Observer pattern (also known as Publish/Subscribe pattern) is a design pattern, used in software engineering to allow an object to maintain a list of observers, subscribers or listeners. The object can then notify them of changes, usually by calling their methods or through eventing. It is defined as a behavioral design pattern, because the program reacts to changes from the observed object.
It creates a one-to-many relationship, so one object can maintain a list and easily inform many others of a change of state.
C# has the IObserver<T> Interface to provide notification.
Read more and download the example from here code.msdn.microsoft.com/Dive-into-Observer-Pattern-00fa8573
↑ Return to Top