GIAC
GSSP-NET · Question #301
Sandra works as a Software Developer for ABC Inc. She develops a Windows form named MyForm1. She wants to add a Button control named button1 to a Panel control named panel1 at runtime. Therefore…
The correct answer is C. She will write the following code statement in line number 9: E. She will write the following code statement in line number 10. See the full explanation below for the reasoning.
Question
Sandra works as a Software Developer for ABC Inc. She develops a Windows form named MyForm1. She wants to add a Button control named button1 to a Panel control named panel1 at runtime. Therefore, she writes the following code: 1. private void MyForm1_Load(object sender, EventArgs e) 2. { 3. Button button1 = new Button(); 4. button1.Location = new Point(50,50); 5. button1.Size = new Size(100, 30); 6. button1.Text = "My First button"; 7. Panel panel1 = new Panel(); 8. panel1.Location = new Point(10, 100); 9. // Write code here 10. // Write code here 11. } Which of the following code statements will Sandra write in line numbers 9 and 10? (Line numbers are for reference only.) Each correct answer represents a part of the solution. Choose two.
Options
- AShe will write the following code statement in line number 9:
- BShe will write the following code statement in line number 9:
- CShe will write the following code statement in line number 9:
- DShe will write the following code statement in line number 10:
- EShe will write the following code statement in line number 10:
How the community answered
(55 responses)- A11% (6)
- B5% (3)
- C82% (45)
- D2% (1)
Community Discussion
No community discussion yet for this question.