private void HandleShapeChanged(object sender, ShapeEventArgs e) { Shape s = sender as Shape; Console.WriteLine("Received event. Shape area is {0}", e.NewArea); s.Draw(); }
protected override void OnShapeChanged(ShapeEventArgs e) { // circle specific processing base.OnShapeChanged(e); }
protected virtual void OnShapeChanged(ShapeEventArgs e) { var handler = ShapeChanged; handler?.Invoke(this, e); }
protected override void OnShapeChanged(ShapeEventArgs e) { // specific rectangle processing base.OnShapeChanged(e); }