In general, what is the main purpose of a Button control?
B. A Button control is used to perform some action when the user clicks it
Which area in Visual C# do you use to create how your application will look when it is run?
D. Design View
What are two important things to remember when writing code in C#?
B. C# is case-sensitive, and every command ends with a semicolon
Which property controls the background color of a control?
C. BackColor
What is a Snap Line?
C. A line that allows you to align controls on your form
Which of the following lines of code will clear the contents of the lblOutput control?
B. lblOutput.Text = "";
Which of the following lines of code can be used to close the form, which will also end the application if only the form is running?
B. Close()
What is the name of the method that is used to highlight, or select, all of the text in a text box?
B. SelectAll()
How do you associate one set of code with multiple control events?
A. Use the Properties area of the Properties window to select the code to associate with different
events
B. Use the Events area of the Properties window to select the code to associate with different events
C. Use the Handles keyword and the different event names at the end of the event header
D. It is not possible to associate one set of code with multiple events
B. Use the Events area of the Properties window to select the code to associate with different events
Which of the following statements will check to see if the check box named chkOption is checked?
D. if (chkOption.Checked == true)
How do you make an access key for an object on your form?
B. Place the ampersand (&) character before the access key letter in the Text property of the control
What can you do if you want to give your user direct access to one of your text boxes using the keyboard?
A. Put a label with an access key next to the text box, and be sure that the label comes just before the text box in the tab order
Which property stores the item that was selected from a list box?
C. SelectedItem
What does the following line of code do?
int [] whatisit = new int[100];
C. This code declares an integer array called whatisit and allocates the space for 100 integers
Which of the following code segments sort the elements of an array named a, in reverse order (decreasing order)?
A. Sort(a);
B. Sort(a);
Reverse(a);
C. SortReverse(a);
D. Reverse(a);
Sort(a);
B. Sort(a);
Reverse(a);
When you put a ToolStrip on your form, where does Visual C# place it by default?
A. The top of the form
The TabControl control can be found in which of the following areas in the Toolbox?
C. Containers
What is the difference between the TabControl and TabPage controls?
D. A TabControl is a container for TabPages
If you want to declare a method that will be available to all code, both inside and outside the class, you should declare it with which keyword?
B. Public
In general, which of the following is correct regarding the declaration of methods and variables inside a class?
B. Variables should be declared as Private and methods as Public
All of the code contained inside a class body is enclosed in what characters?
C. Curly braces {}
Which of the following methods opens a file and write to the file starting at the end of the current file?
C. AppendText
The OpenDialog control will store the full path of the file that the user selects in which property?
D. FileName
Which method must be called in order to display an OpenFileDialog or SaveFileDialog control in your application?
A. ShowDialog
If you want to allow the user to see how a new font will look while the FontDialog control is open, what must be done?
D. Set the ShowApply property for the FontDialog control to True
Which of the following lines of code will correctly change the color of the text that the user has chose to be the color in the ColorDialogBox? Assume that the RichTextBox control's name is rtbMain and the ColorDialogBox control's name is colorDialog1.
B. rtbMain.SelectionColor = colorDialog.Color;
Which of the following properties will make the RichTextBox control resize as the application is resized?
B. Dock
Which of the following C# controls will display all of the records with all of the fields on the form?
B. A DataGridView
Which of the following controls allows you to limit the values the user is allowed to enter in a C# program?
D. A MaskedTextBox
When you create a parameterized query for your TableAdapter, which of the following is automatically added to the form?
B. A Label, a TextBox, and a Button
When using data bound item on your form, which of the following properties determines what is shown to the user in the control?
B. DisplayMember
Which property of a BindingSource object stores a String that limits the values that are stored?
B. Filter
What is the difference between modal and modeless forms?
A. Modal forms allow the user to only work with the current form, while modeless forms allow the user to work with any form in the application
What is the name of the text area that appears when you hold the mouse over a control?
B. ToolTip
Which method contains the Application.Run command that creates and loads the form for a program?
A. Main
What is the purpose of an EventHandler?
D. An EventHandler object lets the computer know what to do when the user interacts with the object