using System; using System.Windows.Forms; using System.Drawing; class Tervitaja2:Form{ Button nupp1=new Button(); TextBox tekst1=new TextBox(); public Tervitaja2(){ nupp1.Location=new Point(20, 30); tekst1.Location=new Point(20, 60); nupp1.Text="Vajuta"; Controls.Add(nupp1); Controls.Add(tekst1); nupp1.Click+=nupp1_Click; } void nupp1_Click(object saatja, EventArgs e){ tekst1.Text="tere"; } public static void Main(string[] arg){ Application.Run(new Tervitaja2()); } }