The observer pattern lets users of a class subscribe to events that happen when this class processes data etc. and be notified when these event occur. In the following example we create a processing class and an observer class which will be notified while processing a phrase - if it finds words that...
IObserver<T> and IObservable<T> interfaces can be used to implement observer pattern in .NET
IObservable<T> interface represents the class that sends notifications
IObserver<T> interface represents the class that receives them
public class Stock {
private string Sym...