static void Main(string[] args) { MyValue t = new MyValue(); ValueChangeObserver v1 = new ValueChangeObserver(t); new ValueAverageObserver(t); t.Value = 100; t.Value = 99; t.Value = 88; t.Value = 77; }
public ValueAverageObserver(MyValue t) { t.ValueChanged += this.ValueChangeFunc; }