public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
// Form has a Text property.
this.Text = "Dot Net Perls";
// TextBox has a Text property.
textBox1.Text = "Thanks";
Results. You can see the results of this program in the screenshot. The title bar text of the window has its text changed to "Dot Net Perls". And the TextBox contains the string "Thanks".
Tip The Text property can be assigned to a string variable reference, or a string literal.
A summary. Knowing how to use the Text property on a Form is confusing because we often don't think of the title bar as text. Other controls implement it a different way.