我是F#的初学者,但早些时候在C#中编程了一点.我试图弄清楚如何编写一个ButtonClicEvent,它将AppendText从按钮(或其他地方)添加到文本框中的现有文本.
这来自C#:
private void Btn_Click(object sender, EventArgs e)
{
// if the eventhandler contains more than one button
var btn = (sender as Button);
textBox.AppendText(btn.Text);
}
Run Code Online (Sandbox Code Playgroud)
需要知道如何在F#中做到这一点.