Filters
Question type

Study Flashcards

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


A) FileException
B) StorageException
C) FException
D) IOException

Correct Answer

verifed

verified

C# has more than 100 defined Exception subclasses.

Correct Answer

verifed

verified

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?


A) StackTrace
B) CallTrace
C) MethodTrace
D) ClassTrace

Correct Answer

verifed

verified

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


A) System
B) Application
C) CLR
D) Object

Correct Answer

verifed

verified

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


A) default block
B) always block
C) execute block
D) finally block

Correct Answer

verifed

verified

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


A) The method call trace.
B) The memory call pool.
C) The call stack.
D) The function call.

Correct Answer

verifed

verified

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


A) StackTrace
B) Message
C) toString
D) ThrownText

Correct Answer

verifed

verified

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


A) execute
B) always
C) finally
D) default

Correct Answer

verifed

verified

If a finally block is associated with a try…catch pair, what are the three possible outcomes of the try that result in execution of the finally block?

Correct Answer

verifed

verified

The code in the finally block executes n...

View Answer

You can place any number of statements in a try block, including those you know will never throw an exception.

Correct Answer

verifed

verified

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


A) A default constructor.
B) A constructor that takes a string message.
C) A constructor that takes a string message and an inner exception.
D) A constructor that takes a byte variable containing memory dumps.

Correct Answer

verifed

verified

The StackTrace property of an Exception can be a useful debugging tool.How is this property used when debugging?

Correct Answer

verifed

verified

The StackTrace property is a useful Exce...

View Answer

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


A) TryData()
B) TryFromString()
C) TryParse()
D) TryConvert()

Correct Answer

verifed

verified

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


A) fault tolerance
B) critical functionality
C) load forgiveness
D) system robustness

Correct Answer

verifed

verified

If you are working on a professional project, Microsoft recommends that you use the general Exception class in a catch block.

Correct Answer

verifed

verified

Most exceptions that are used by programmers derive from three C# classes.What are those classes?

Correct Answer

verifed

verified

Most exceptions will derive from three c...

View Answer

A catch block can catch how many types of Exceptions?


A) An unlimited number of Exception types.
B) Only one can be caught.
C) As many as can be matched.
D) Two, after which the program ends.

Correct Answer

verifed

verified

What method can be used to terminate an application?


A) Environment.Exit()
B) Environment.Bye()
C) Environment.Quit()
D) Environment.Terminate()

Correct Answer

verifed

verified

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?


A) System.ArrayTypeMismatchException
B) System.TypeMismatch
C) System.FormatException
D) System.InvalidCastException

Correct Answer

verifed

verified

Showing 21 - 39 of 39

Related Exams

Show Answer