Multiple choice technology programming languages

You create an application with built-in exception handling. For some types of exceptions, you want to add an event to the Event Log that specifies the line of code that initiated the exception. Which Exception property should you use?

  1. Message

  2. StackTrace

  3. Source

  4. Data

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The StackTrace property contains the execution history of the call stack, which includes the file names and line numbers where an exception originated. Message only describes the exception, Source identifies the assembly, and Data contains custom key-value pairs.