Untitled spreadsheet - Sheet1 Flashcards
Fatal errors include simple errors in code that prevent compilation or errors that occur during run time.
T
Semantic errors are errors that cause applications to fail completely, such as simple error in code that prevent compilation.
F
CS allows you to build applications in what two configurations?
Debug & Release
Debug builds maintain symbolic information about your application.
T
How can you switch between the Debug and Release configurations in VS?
Using the Solution Configurations drop-down menu in the Standard toolbar.
In the release configuration application code is optimized. As a result Release builds will run much faster than Debug builds?
T
The process of identifying and fixing areas of code that don’t work as expected is known as what?
Debugging
What is the main advantage of using Release builds?
Release builds run faster
Debug.WriteLine() and Trace.WriteLine() only allow output of a single string?
T
There is one way to outpute debugging information?
F
An alternative to writing information to the output window is to use:
Debug.Write() & Trace.Write()
Tracepoints are a function of C#
F
Tracepoints serve the same function as using Debug.WriteLine(). They allow you to output debugging information without altering your code.
T
What does a tracepoint do?
Enabel youto output debugging information without modifying the code.
What does a tracepoint do?
Writes information to the output window.
Tracepoints have no equivalent to the trace commands. There is no way to output information in a Release build using tracepoints.
T
What is the disadvantage/advantage of tracepoints.
The tracepoint is stored in VS.
The simplest way to enter break mode is to click the Pause button in the IDE while an application is running
T
Trace commands are often the only option should you want output during execution of an application built in release mode.
T
What is a breakpoint?
A marker in the source code that triggers automatic entry into break mode.
When should you use a tracepoint?
When debugging an application to quickly output important information that may help resolve semantic errors.
While using debugging in Break Mode you can pause, stop, and restart the application?
T
A breakpoint appears as a blue circle next to the line of code.
F
Selecting Hit Count opens a dialog box where you can specify how many times a breakpoint needs to be hit before it is triggered. The drop down list enables what options?
Break always; hit count is =, %, >=
What are the two ways to get into break mode?
Enter break mode when an unhandled exception is thrown. Break when an assertion is generated.
What are assertions?
instructions that can interrupt application execution with a suer-defined message.
What is the easiest way to check the value of a variable?
Hover the mouse over its name in the source code while in break mode.
You can distribute release builds of your application containing Debug.Assert() functions to keep tabs on things.
F
It is not possible to pin tooltip windows to the code view.
F
Step into executes and moves to the next statement to execute.
T
What are the three ways to control program flow in break mode?
Step Into, Over, Out
What does Step Out do?
Runs to the end of the code block and resumes break mode at the statement that follows.
The Call Stack Window enables you to execute commands while an application is running.
F
The Command and Immediate windows enable you to execute commands while an application is running
T
What is the purpose of the Call Stack window?
Showing the current function along with the function that called it, and the one that called it, et cetera.
Which window shows you the way in which the program reached the current location?
Call Stack Window
An exception is an error generated either in your code or in a function called by your code that occurs before runtime
F
The C# language includes syntax for SHE. It stands for Stack Exception Handling.
F
What are the three key words mark code as being able to hand exceptions, along with instructions specifying what to do when an exception occurs?
Try, Catch, Finally
What does SEH stand for?
Structured Exception Handling
What is error handling?
All techniques of anticipating broblems and writing code that is robust enough to deal with the errors gracefully, without interrupting execution.
The “catch” in a try…catch…finally structure contains code that might throw exceptions.
T
You use the C# toss keyword to generate an exception.
F - Throw
You don’t always have to supply “catch” blocks for more specific exceptions before more general catching.
F
You must always supply catch blocks for more specific exceptions before more general catching, or the application will fail to compile.
T
Exceptions are errors that occur at runtime and that you can trap and process programmatically to prevent your application from terminating.
T
You can add breakpoints anywhere in your code and you can configure breakpoints to break execution only under specific conditions.
T
A class encapsulates part of the application, which can be a process, a chunk of data, or a more abstract entity.
F
Object-oriented programming is a relatively new approach to creating computer applications that seeks to address many of the problems with traditional programming techniques.
T