Hi all,
I am new to C# and have a problem.
I have a created a class called All_Buttons and have a method inside it called create_button1().
This method creates a button called b1. At the end of the method I have added Controls.Add(b1).
Inside the class, Controls.Add(b1) gives an error but having the same method outside of the class works fine.
Anyone know how to fix this?
I am new to C# and have a problem.
I have a created a class called All_Buttons and have a method inside it called create_button1().
This method creates a button called b1. At the end of the method I have added Controls.Add(b1).
Inside the class, Controls.Add(b1) gives an error but having the same method outside of the class works fine.
Anyone know how to fix this?
Attachments
-
685 bytes Views: 8