C# Final 11-14

¡Supera tus tareas y exámenes ahora con Quizwiz!

In a MenuStrip, placing what character in front of a unique letter allows the use to press Alt and then the given letter to activate the menu choice as an alternative to clicking it with the mouse?

&

What character can be placed before a letter in the Text property value of a ButtonBase object to make the letter function as an access key?

&

According to the creators of C#, an infrequent event in code is one that happens in less than what percent of all program executions?

30%

When creating an Exception class, what is not one of the three recommended constructors needed?

A constructor that takes a byte variable containing memory dumps.

What property can be configured to cause a Control to remain at a fixed distance from the side of a container when the user resizes it?

Anchor

What class should you extend in order to create your own Exception that you can throw?

ApplicationException

What Filestream property indicate whether the Filestream supports reading?

CanRead

What type of object is a GUI widget the user can click to select an option, and allows for any number of these objects to be selected at the same time?

CheckBox

What method is shared by CheckBox and RadioButton objects and is called when the object is clicked by the user?

CheckedChanged()

What object is similar to a ListBox but with check boxes appearing to the left of each item?

CheckedListBox

When filling in the items in a MenuStrip control, double clicking an entry automatically generates what type of method?

Click ()

When you double- click the Button on the Form in the IDE, you automatically generate the shell of what method?

Click()

What is similar to a ListBox, except that it displays an additional editing field to allow the user to select form the list or to enter new text?

ComboBox

What public Control property can be used to determine whether a control or one of its child controls currently has the input focus?

Contains Focus

What class provides the definition for GUI objects?

Control

What control displays a month calendar when the down arrow is selected?

DateTimePicker

What file can be opened to examine all the code generated by the Windows Form Designer for an application that creates a Form?

Designer.cs

What property can you set in order to attach a Control to the side of a container so that the Control stretches when the container's size is adjusted?

Dock

What method can be used to terminate an application?

Environment.Exit()

The connection of an event to its resulting actions is know by what term?

Event wiring

In a button event- handler parameter list, the second argument is an object of what type?

EventArgs

What class has a static field named Empty that represents an event that contains no event data?

EventArgs

For events that do not use additional information, the .NET Framework has already defined an appropriate delegate type with what name?

EventHandler

In C#, all exceptions are objects that are members or derived members of what specific class?

Exception

The ApplicationException class is a subclass of what other class?

Exception

What class do you utilize to change the appearance of printed text on your Forms?

Font

What type of exception is thrown if there is an issue with file operations, such as opening, reading from, or writing to a file?

IOException

How does a C# application open a file?

It opens a file by creating an object and associating a stream of bytes with that object.

When writing a block of code in which something can go wrong, where should you place the block?

It should be placed in a try block.

When a C# application is done using a file, what should it do with the file?

It should close the file.

What property stores the key code along with any modifier key for a key event?

KeyData

Depend on that event, the delegate used to create the keyboard event handler is either KeyEventHandler or what other event handler?

KeyPressEventHandler

What can you use to provide the capability to link a user of your program to other sources, such as Web pages or files?

LinkLabel

ListBox, ComboBox, and CheckedListBox objects all allow users to select choices from a list. These three classes descend from what parent class?

ListControl

What object can you instantiate on a remote computer so that you can manipulate a reference to the object rather than a local copy of the object?

MarshalByRefObject

What property for a MonthCalendar object allows you to specify the last day that can be selected?

MaxDate

What read-only property in the Exception class contains useful information about an Exception object?

Message

What control allows you to retrieve date information?

MonthCalendar

Wheat event occurs when the user clicks the mouse within the Control's boundaries?

MouseClick

Mouse events can be handled for any control through an object of what class?

MouseEventArgs

What event occurs when the mouse cursor leaves the Control's boundaries?

MouseLeave

What event occurs when a mouse button is released while the mouse is within the Control's boundaries?

MouseOp

What ListBox property with a Boolean value allows you to configure whether or not to display items in columns instead of a straight vertical list?

MultiColumn

What happens when the TabIndex values of two or more Controls is set to 0?

No errors are generated, but only one control will receive focus.

What happens when you divide a floating point value by 0 in C#?

No exception occurs, and the special value Infinity is returned as the result

A catch block can catch how many types of Exception?

Only one can be caught

What type of GUI widget object allows the user to click to select an option, but only allows for one within a given group to be selected at a time?

RadioButton

What method is a member of the String class and takes a character delimiter parameter and separates a string into substrings at each occurrence of the delimiter?

Split()

When you catch an Exception, what property holds a list of methods in the call stack as its value, allowing you to determine the location of the Exception?

StackTrace

The Environment.Exit() method is part of what namespace?

System

An exception belonging to what specific class is thrown when an attempt is made to store an element of the wrong type within an array?

System.ArrayTypeMismatchException

An exception of the _____________ class is thrown when an ongoing operation is aborted by the user.

System.Data.OperationAbortedException

What Boolean property of a Control identifies whether the Control will serve as a stopping place in a sequence of Tab key presses?

TabStop

When users encounter multiple GUI Controls on a Form, and a user presses the Enter key, what usually happens?

The Control that has focus will raise an event.

The memory location where the computer stores the list of locations to which the system must return is known as what term?

The call stack

For static methods, what does a delegate object encapsulate?

The method to be called.

If you attempt to open a file with the Open file mode, what happens if the file does not exist?

The program throws a System.IO.FileNotFoundException error.

What method is overridden by the Execution class in order to provide a descriptive error message and provide a user with precise information about the nature of any Exception that is thrown?

ToString()

What methods are used to convert string data to another data type, such as int, double or bool, without fear of generating an exception?

TryParse()

Where do automatically generated statements that set the properties of the labels, buttons, and forms end up?

Within the InitializeComponent() method

When you copy data from a file on a storage device into RAM, what are you doing?

You are reading from the file.

When you store data in a computer file on a persistent storage device, what are you doing

You are writing to the file

Approximately how many bytes are in a gigabyte?

a billion bytes

What is a collection of fields that contain data about an entity?

a record

When you perform an input operation in an application, the bytes flowing into your program from an input device can be pictured as what?

a stream of information

In C#, when something interesting happens to an object, what is said to have occurred?

an event

What provides a way for the clients of a class to dictate methods that should execute when an event occurs?

an event

What format is used by files that store music of images?

binary

When you drag multiple Controls onto a Form, what appears to help you align new Controls with others already in place?

blue snap lines

What term describes any one of the letters, numbers, or other special symbols (such as punctuation marks) that compromise data.

character

What keyword can be used to declare a delegate?

delegate

What is used to declare you own event in C#?

delegates

What must be done in order to convert streams of bytes back into objects?

deserialization

What class can be used to provide information on directories or folders?

directory

When designing a Form, what design feature facilitated by the IDE will you typically utilize instead of typing code statements?

drag and drop code generation

What term can be used to describe an event- handler method?

event receiver

What class contains methods that allow you to access information about files?

file

What block can you use to ensure that input and output related files are properly closed?

finally

In general, what block do you use to perform clean- up tasks that must occur, regardless of whether any errors occurred or were caught?

finally block

Most computer users organize their files into directories, which are also known by what term?

folders

A C# delegate is similar to what variable type in C++ that holds a method's memory address?

function pointer

What expression describes the act of calling an event method?

invoking the event

An event that occurs as a result of interaction with the keyboard is known as what type of event?

key events

Hardcoding numbers (unnamed, literal constants) in a code without explanation is a bad programming practice. What are these hardcoded numbers known as?

magic numbers

What is a secondary window that takes control of a program known as?

modal window

Permanent storage that does not lose contents when a computer loses power is know as what type of storage?

nonvolatile

All classes in the C# programming language, including the Exception class, are descendants of what built in class?

object

When designing a MenuStrip control, the programmer should follow conventional menu order. As an example, where should the Help option be located on the main menu?

on the far-right side

Files exist on devices such as hard disks, USB drives, reels of magnetic tape, and optical discs. What are these files considered to be?

permanent files

Due to the fact that data can be erased from files, what term do programmers generally prefer over permanent storage?

persistent storage

What is the system of passing an exception through a chain of calling methods called?

propagating the exception

What is another term for the performing of an action, such as the click of a button by a user?

raising an event

When you write a method that catches an Exception, rather than handling the Exception itself, it can pass the exception to the method that called your method. What is this known as?

rethrowing the Exception

A data file is what type of file when each record is read in order of its position in the file?

sequential access file

What is the process of converting objects into streams of bytes known as?

serialization

What represents the degree to which a system is resilient to stress and able to maintain correct functioning?

system robustness

What a file is open in C#, what holds the byte number of the next byte to be read?

the file position pointer

What file mode is used to open an existing file, and empty the file once opened so that the file is zero bytes in size?

truncate

A block that contains statements that can never execute under any circumstances due to a program's logic is known as what kind of block?

unreachable block

When you write a C# program that stores a value in a variable, you are using temporary storage; the value you store is lost when the program ends or the computer loses power. What is the name for this kind of storage?

volatile


Conjuntos de estudio relacionados

EGCC - BUS101 Intro to Business - Ch. 9-10 - Quiz

View Set

Chapter 1: Risk Introduction and Overview

View Set

Pharmaceutics Exam II Quizzes, Examples, & Presentation Questions

View Set

LS 7B The Carbon Cycle: Ecology, Biodiversity, and Evolution

View Set

AP Stats Semester 1 2017-2018 Finals Review

View Set

ACCT Chapter 3 Job-Order Costing: Cost flows and External Reporting

View Set

Unit 1 Keys (computational, no graphing) Algebra 2

View Set