, . , "" . , :
using System;
using System.Windows.Forms;
class MyButtonClass: Form
{
private Button mrButton;
// -
public MyButtonClass()
{
mrButton = new Button();
mrButton.Text = " !";
this.Controls.Add(mrButton);
}
//
static void Main()
{
Application.Run(new MyButtonClass());
}
// -
void MyButtonClickEventHandler(object sender, EventArgs e)
{
mrButton.Text = " !";
}
}
?
- ( X , ).
- F5 .
- " ". ?!
, , . void , . MyButtonClickEventHandler.
, , , . , , (object sender, EventArgs e)? , . "Click", , . . , .
. object EventArgs. sender e, . , , , . , x y.
. : . . , , .
void MyButtonClickEventHandler(object x, EventArgs y)
{
mrButton.Text = " !";
}
, . .
: , " ".