using System.Windows.Forms; class ex : Form { Label lb1 = new Label(); TextBox tb1 = new TextBox(); ex() { Text = "hello"; lb1.Text = "example label:"; Controls.Add(lb1); Controls.Add(tb1); } static public void Main() { Application.Run(new ex()); } }