Beispiel #1
0
 protected virtual void OnNumberReached(NumberReahedEventArgs e)
 {
     if (NumberReahed != null)
     {
         NumberReahed(this, e);//Raise the event
     }
 }
Beispiel #2
0
 public void CountTo(int CountTo, int ReachableNum)
 {
     if (CountTo < ReachableNum)
     {
         throw new ArgumentException("Reachable number should be less than the ");
     }
     for (int ctr = 0; ctr <= CountTo; ctr++)
     {
         if (ctr == ReachableNum)
         {
             NumberReahedEventArgs e = new NumberReahedEventArgs(ReachableNum);
             OnNumberReached(e);
             return;
         }
     }
 }