0
我正在嘗試更改事件參數中的值。不知道這是可能的,但是這是在父類中我目前的事件:如何返回一個事件的值(氣泡值增加)?
public void MasterClass()
{
void btnSubmit_Click(object sender, EventArgs e)
{
...
OnInputBound(this, new InputEventArgs(postName, value));
//I would like to try something like this but does not work:
//value = OnInputBound(this, new InputEventArgs(postName, value));
//Continue with new value...
}
}
在應用程序的其他部分,他們通常註冊事件是這樣的:
protected override void CreateChildControls()
{
MyForm.OnInputBound += new EventHandler<InputEventArgs>(MyForm_OnInputBound);
}
void MyForm_OnInputBound(object sender, SingleForm.InputEventArgs e)
{
e.Value = "new value";
}
通知我如何我正試圖改變MasterClass的參數。這顯然不起作用,但我如何將這個值提升?