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