public void ReducePopulation(object source, EventArgs eventArgs) { --ActualPopulation; PopulationEventArgs args = new PopulationEventArgs(); args.ActualPopulation = this.ActualPopulation; OnPopulationReduced(args); }
protected virtual void OnPopulationReduced(PopulationEventArgs e) { EventHandler <PopulationEventArgs> handler = PopulationReduced; if (handler != null) { handler(this, e); } }