Chapter 2 - Introduction to Visual C#
A piece of data that is written into a program's code is a(n) ____________. a. identifier b. specifier c. keyword d. literal
.literal
True or False Buttons are the only controls that can respond to click events.
False
True or False By default, a label's text is aligned with the bottom and right edges of the label's bounding box..
False
True or False Changing an object's Text property also changes the object's name.
False
True or False The Visible property is a Binary property, which means it can be set only to the values 1 and o
False
True or False The assignment operator assigns the value that appears on its left side to the item that appears on its right side.
False
True or False To close an applications form in code, you use the statement 'Close.This();
False
True or False You add your own code to the Program.cs file as you develop an application.
False
True or False A Label's control's Text property is initially set to the same value as the Label control's name.
True
True or False C# code is organized as methods, which are contained inside the classes, which are contained inside namespaces.
True
True or False C# source code files always end with the .cs extension.
True
True or False In C# code, each opening brace must have a corresponding closing brace at some point later in the program.
True
True or False In C#, there are three types of comments: line comments, block comments, and documentation comments.
True
True or False Label controls are useful for displaying output while an application is running.
True
True or False PictureBox controls also have a BorderStyle property that works just like a Label control's BorderStyle property.
True
True or False The Visual Studio code editor examines each statement as you type it, and reports any syntax errors that are found.
True
True or False The form's title is displayed in the bar along the top of a form.
True
True or False When a Label control's AutoSize property is set to True, you cannot manually change the size of the control by clicking and dragging its bounding box.
True
True or False When a form is created, its Text property is initially set to the same value as the form's name.
True
True or False When you double-click a control in the Designer, Visual Studio not only creates an empty event handler, but it also writes some code that you don't see, elsewhere in the project that is necessary for the event handler to properly function.
True
True or False When you write the values 'true' or 'false' in code, they must be written in all lowercase letters
True
____________ is the image's width to height ratio. a. Aspect Ratio b. Size Ratio c. Projection Ratio d. Area Ratio
a. Aspect Ratio
A(n) ____________ property can be set to one of two possible values: True or False. a. Boolean b. Logical c. Binary d. Dual
a. Boolean
The standard notation for referring to a control's property in code is ____________. a. ControlName.PropertyName b. ControlName=Property =Name c. PropertyName.ControlName d. PropertyName=ControlName
a. ControlName.PropertyName
Once you have created a PictureBox control, you use its ____________ property to specify the image that it will display a. Image b. Source c. DrawSource d. ImageList
a. Image
A ____________ can occupy multiple consecutive lines in a program. a. block comment b. square comment c. multiline comment d. machine comment
a. block comment
The statement MessageBox.Show("Hello World"); is an example of a(n) ____________. a. method call b. namespace c. Click event d. event handler
a. method call
A(n) ____________ marks the end of a programming statement in C#. a. semicolon b. period c. hyphen d. underscore
a. semicolon
____________ is the name of the blank form that Visual Studio initially creates in a new project. a. Form1 b. Main c. New1 d. Blank
a.Form1
Label controls have a(n) ____________ property that controls the way they can be resized. a. Stretch b. AutoSize c. Dimension d. Fixed
b. AutoSize
You can use a(n) ____________ control to display a graphic image on a form. a. Graphics b. PictureBox c. Drawing d. ImageBox
b. PictureBox
The ____________ property holds the text that is displayed on the face of the button. a. Name b. Text c. Tag d. Face
b. Text
The equal sign (=) is known as the ____________. a. equality symbol b. assignment operator c. equality operator d. property position
b. assignment operator
The time during which you build the GUI and write the application's code is referred to as ____________. a. run time b. design time c. code time d. planning
b. design time
A(n) ____________ is a method that executes when a specific event takes place while an application is running. a. action process b. event handler c. runtime procedure d. event method
b. event handler
A ____________ appears on one line in a program. a. inline comment b. line comment c. forward comment d. block comment
b. line comment
Programmers commonly use blank lines and indentations in their code to create a sense of ____________. a. logic b. visual organization c. documentation d. program flow
b. visual organization
____________ is a feature of Visual Studio that provides automatic code completion as you write programming statements. a. AutoCode b. AutoComplete c. IntelliSense d. IntelliCode
c. IntelliSense
When you want to display text on a form, you use a ____________ control. a. Button b. PictureBox c. Label d. TextBox
c. Label
The PictureBox control's ____________ property specifies how the control's image is to be displayed. a. RenderMode b. DrawMode c. SizeMode d. ImageMode
c. SizeMode
Most control's have a ____________ property that determines whether the control is visible on the form at run time. a. Render b. Viewable c. Visible d. Draw
c. Visible
In code, you use a(n) ____________ to store a value in a control's property. a. Click event b. method call c. assignment statement d. Boolean value
c. assignment statement
A(n) _____________ is the thin dotted line that enclosed an object in the Designer. a. selection marker b. control binder c. bounding box d. object container
c. bounding box
The time during which an application is executing is referred to as ____________. a. go time b. design time c. execution d. run time
c. execution
In programming we use the term string to mean ____________. a. many lines of code b. parallel memory locations c. string of characters d. virtually anything
c. string of characters
The ____________ property allows you to set the font, font style, and size of the control's text. a. Style b. AutoSize c. Text d. Font
d. Font
The ____________ property can be used to change the text's alignment in the label. a. TextPostion b. AutoAlign c. TextCenter d. TextAlign
d. TextAlign
A namespace is container that holds ____________. a. methods b. names c. spaces d. classes
d. classes
The small squares that appear on the right edge, bottom edge, and lower-right corner of a form's bounding box are called ____________. a. sizing hooks b. form edges c. bounding tags d. sizing handles
d. size handles
A file that contains program code is called a(n) ____________. a. destination code file b. executable file c. machine language file d. source code file
d. source code file
Programmers commonly use blank lines and indentations in their code to create a sense of ____________. a. Close(); b. Close.This(); c. Close() d. this.Close();
d. this.Close();