Patel

Patel

  • NA
  • 81
  • 17.8k

Tell me on which thread button1 and button2 created

Nov 25 2020 1:20 AM
I have added one button in designer.cs file and second button creating runtime on first button click. Tell me on which thread button1 and button2 created
  1. using System;  
  2. using System.Drawing; using System.Windows.Forms;  
  3. namespace WinformTest {public partial class Form1 : Form{public Form1()  
  4. {  
  5. InitializeComponent();  
  6. //button1 added at designer.cs  
  7. }  
  8. private void button1_Click(object sender, EventArgs e)  
  9. {  
  10. //Dynamically creating button2.  
  11. Button button2 = new Button();  
  12. button2.Location = new Point(112, 33);  
  13. button2.Name = "button2";  
  14. button2.Size = new Size(78, 33);  
  15. button2.TabIndex = 1;  
  16. button2.Text = "button2";  
  17. }  

Answers (3)