Hi I am trying to set this RichTextBox variable name from TextBox to string name is this possible?
public void AddTab(string name)
{
TabPage NewPage = new TabPage(name);
RichTextBox TextBox = new RichTextBox();
TextBox.GetType().GetProperty("Name").SetValue(TextBox, name,null);
this.tabControl1.TabPages.Add(NewPage);
NewPage.Controls.Add(TextBox);
TextBox.Location = new System.Drawing.Point(0, 0);
TextBox.Name = name;
TextBox.Size = new System.Drawing.Size(790, 460);
TextBox.TabIndex = 0;
TextBox.Text = "";
}