I have this as one of my members of the class 'KeyEvent':
private delegate void eventmethod();
And the constructor:
public KeyEvent(eventmethod D)
{
D();
}
What I want to do is instead of calling D() there, I want to store that method (D) as a member variable of KeyEvent, so something like:
stored_method = D();
And then later in another method of KeyEvent, do something like:
stored_method();
How can I do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…