Multiple choice technology databases

Which property of Exception class provides the line number of the code that caused exception:

  1. Message

  2. StackTrace

  3. Source

  4. Line number

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

The StackTrace property provides a string representation of the frames on the call stack at the time of the current exception, including line numbers when debugging symbols are available. The Message property only contains the error description text. Source refers to the application name, and there is no built-in 'Line number' property.