Exemplo n.º 1
0
            // any method inside of Stock class can call the event, which then triggers subscribers

            protected virtual void OnPriceChanged(PriceChangedEventArgs e)
            {
                PriceChanged?.Invoke(this, e); // null propagation, will check for null before invocation
            }
Exemplo n.º 2
0
 // any method inside of Stock class can call the event, which then triggers subscribers
 protected virtual void OnPriceChanged(PriceChangedEventArgs e)
 {
     PriceChanged?.Invoke(this, e); // null propagation, will check for null before invocation
 }