Intermediate C# Programming

  1. Which of the following is the name of a program that translates a high-level language into machine language?




    C. Compiler
  2. What does the following line of code do? MessageBox.Show("The End");




    B. This will show the text "The End" in a smaller window
  3. What is the purpose of the thumbtack icon?




    B. Clicking the thumbtack will toggle the window between being automatically hidden and being permanently in view
  4. What is the name of the area that stores all of the controls that you can put onto your form?




    A. Toolbox
  5. What are the advantages to running your program by selecting Start Without Debugging?




    A. The program will start and execute much quicker
  6. What is the name of the area in the visual C# IDE that allows you to view and change characteristics of each control in your program? 




    D. Properties Window
  7. Which of the following properties does every control in C# have?




    A. Name
  8. If you set the Location property of a control to 0, 0, where will it be displayed on the form?




    C. The upper-left corner
  9. If you want to change the words displayed in a control on your form, which of the following properties should you change?




    C. Text
  10. What is the purpose of the AutoSize property?




    A. AutoSize forces the control to be just big enough to hold the text information in the Text property
  11. Which of the following lines of code will correctly multiply the contents of the txtInput text box by 10 and display the result in the lblOutput label?




    C. lblOutput.Text = Convert.ToString(Convert.ToInt32(txtInput.Text) * 10
  12. What will be displayed in the lblOutput control when the following code runs? lblOutput.Text=Convert.ToString("10"+"10");




    D. 1010
  13. What is the correct order for the values placed in the MessageBox.Show command?




    A. Displayed text, title, buttons, icon
  14. In order to get your numbers formatted correctly in C#, which of the following need to be used?




    D. String.Format(), a placeholder, and a format code
  15. What does C# call the order in which a control receives focus?




    C. Tab order
  16. Which control allows the user to choose none or many options on your form?




    C. Check box
  17. Which of the following works best if you need to have your select both their sex and their marital status?




    C. Use two group boxes, each with two radio buttons
  18. How do you give the user the ability to execute a button's code just by pressing ENTER, whether or not the button is active?




    B. Assign the AcceptButton property of the form to be the desired button
  19. How do you get C# to execute more than one statement after an if statement?




    B. Place curly braces at the beginning and end of the statements to form a code block
  20. Which of the following lines of code can be used to see if the user failed to make a selection in the chkOption control?





    B. if (chkOption.CheckState == CheckState.Indeterminate)
Author
jdavis123
ID
356390
Card Set
Intermediate C# Programming
Description
Lesson 1 - 4
Updated