When the observer changes, all the observers are notified through the Notify interface. Avoid direct implementation and reduce coupling. [Csharp] <span style = "font-size: 12px;"> abstract class Subject {private IList <Observer> observers = new List <Observer> (); // Add public void Attach (Observer observer) {observers. add (observer);} // remove the Observer public void Detach (observer) {observers. remove (observer);} // Notify public void Policy () {foreach (Observer o in observers) {o. update () ;}}</span> abstract observer Observers class calls Update when a topic notification is received. Called the Update interface [csharp] <span style = "font-size: 10px;"> abstract class Observer {public abstract void Update ();} abstract class Subject </span> the concreteObserver class of the observer implements the update interface of the abstract observer to update the current state. [Csharp] class ConcreteObserver: Observer {private string name; private string observerState; private ConcreteSubject subject; public ConcreteObserver (ConcreteSubject subject, string name) {this. subject = subject; this. name = name;} public override void Update () {observerState = subject. subjectState; Console. writeLine ("The Observer {0} status is {1}", name, observerState);} client [csharp] static void Main (string [] args) {ConcreteSubject a = new ConcreteSubject ();. attach (new ConcreteObserver (a, "B");. subjectState = "state a";. Y (); Console. read ();}