private void WhenEndReached(HoldingVariable e) { EventHandler <HoldingVariable> handler = ThresholdReached; //Who is is sending and what value we are sending if (handler != null) { ThresholdReached(this, e); } }
public void Run() { HoldingVariable args = new HoldingVariable(); //we are setting value to variables in the class args.Threashold = 420; args.Time = DateTime.Now; for (int i = 0; i < 2; i++) { WhenEndReached(args); } }