Question: To convert a string to a double, we use the ________ method.
Answer Choices:
String.ToDouble
TryParse.Double
ToString
Double.TryParse
Answer: Double.TryParse
Question: A ________ is a name that represents a value that cannot be changed during the program’s execution.
Answer Choices:
named constant
keyword
literal
sentinel
Answer: named constant
Question: The top-down design process is sometimes called stepwise refinement.
Answer Choices:
True
False
Answer: True
Question: When the user selects an item in a ListBox, the item’s index is stored in the ListBox’s _______ property.
Answer Choices:
SelectedIndex
ValueIndex
DataValue
Index
Answer: SelectedIndex
Question: It is important that you do not modify the contents of the Form1.cs file because doing so could prevent the application from executing.
Answer Choices:
True
False
Answer: False
Question: You can pass int arguments into int parameters, but you cannot pass double or decimal arguments into int parameters.
Answer Choices:
True
False
Answer: True
Question: If you are writing a method and you want it to receive arguments when it is called, you must equip the method with one or more access modifiers.
Answer Choices:
True
False
Answer: False
Question: A field’s scope is the entire class, so when you declare a field, all the methods in the class can access the variable.
Answer Choices:
True
False
Answer: True
Question: A ________ is a field that cannot be changed by any statement in the class.
Answer Choices:
literal field
constant field
sentinel field
common field
Answer: constant field
Question: The .NET Framework provides a method named MessageBox.Show that you can use in Visual C# to display a message box.
Answer Choices:
True
False
Answer: True
Question: A method that has an output parameter must set the output parameter to some value before it finishes executing.
Answer Choices:
True
False
Answer: True
Question: Changing the form’s Text property will change the form’s name.
Answer Choices:
True
False
Answer: False
Question: The ________ keyword is required when specifying a variable as an output variable.
Answer Choices:
static
out
in
new
Answer: out
Question: Each opening brace ({) of a code container must have a corresponding closing brace (}) at some later point in the program.
Answer Choices:
True
False
Answer: True
Question: When you pass the formatting string ________ to the ToString method, the number is returned formatted as currency.
Answer Choices:
“C” or “c”
“N” or “n”
“P” or “p”
“X” or “x”
Answer: “C” or “c”