In C# win forms- I would like to add controls to form from other class.
How can I do it?
I tried to pass the form as formal parameter to function in the other class, but how can I attach it to the form?
class Class1 { System.Windows.Forms.TextBox txt = new System.Windows.Forms.TextBox(); } In addition, I have Form1.cs
I would like to add txt to Form1.
In addition, I would like to set the properties of txt from Class1, and it failed..
Thanks!