[c#] How do you change the text in the Titlebar in Windows Forms?

I am trying to set a condition that would change the writing inside the title bar...

But how do I change the title bar text?

This question is related to c# winforms titlebar

The answer is


For changing the Title of a form at runtime we can code as below

public partial class FormMain : Form
{
    public FormMain()
    {
        InitializeComponent();
        this.Text = "This Is My Title";
    }
}

Similar questions with c# tag:

Similar questions with winforms tag:

Similar questions with titlebar tag: