Say I have a class named Frog, it looks like:
public class Frog
{
public int Location { get; set; }
public int JumpCount { get; set; }
public void OnJump()
{
JumpCount++;
}
}
I need help with 2 things:
- I want to create an event named Jump in the class definition.
- I want to create an instance of the Frog class, and then create another method that will be called when the Frog jumps.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…