Esempio 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
            }
 // 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
 }