Beispiel #1
0
 public void OnBallInPlay(BallEventArgs e)
 {
     EventHandler ballInPlay = BallInPlay;
     if (ballInPlay != null)
     {
         ballInPlay(this, e);
     }
 }
Beispiel #2
0
        static void Main1(string[] args)
        {
            Ball ball = new Ball();
            Pitcher pitcher = new Pitcher(ball);

            BallEventArgs ballEventArgs = new BallEventArgs(45, 100);
            ball.OnBallInPlay(ballEventArgs);
        }