GIAC
GSSP-.NET · Question #356
(Topic 3) 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…
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
- (Topic 3) 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
(52 responses)- A10% (5)
- B2% (1)
- C85% (44)
- D4% (2)
Community Discussion
No community discussion yet for this question.