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