I don\'t know what to do because the error is in the Form1.Designer.cs
and because I have no experience in debugging that part of the program.
/
The error is on this.Name = "Form1";
I suspect you have created a control named Name
, which conflicts with the Name
property of the window. Just rename the control to something else and it should work again.
The error must come from somewhere else, there's nothing here with a TextBox
. The error is probably caused by assigning a string to a TextBox itself instead of assigning a string to the Text
property of the TextBox.
TextBox tb = new TextBox();
tb = "Default text";
This should be:
TextBox tb = new TextBox();
tb.Text = "Default text";
Otherwise you have created a control with a name like Name
or Text
, in which case you'll have to rename it to NameTextBox
or something.