i am trying to make a dialog box with a separate form for the dialog box, but for some reason it gets this error:
Error CS1061 'object' does not contain a definition for 'Add' and no accessible extension method 'Add' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
here is my code:
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(220, 121);
object p = this.Controls.Add(this.button2);
object p3 = this.Controls.Add(this.button1);
object p2 = this.Controls.add(label1);
object p1 = this.Controls.Add(this.textBox1);
this.Name = "name";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
NOTE:I am kind of new to this, so explain in any answers on this question in basic understanding.
How do I fix this!
