C# Programming - Exception Handling - Discussion

Discussion Forum : Exception Handling - General Questions (Q.No. 7)
7.
Which of the following statements are correct about the exception reported below?
Unhandled Exception: System.lndexOutOfRangeException: Index was outside the bounds of the array: at IndiabixConsoleApplication.MyProgram.SetVal(Int32 index, Int32 val) in D:\Sample\IndiabixConsoleApplication\MyProgram.cs:line 26 at IndiabixConsoleApplication.MyProgram.Main(String[] args) in D:\Sample\IndiabixConsoleApplication\MyProgram.cs:line 20
  1. The CLR failed to handle the exception.
  2. The class MyProgram belongs to the namespace MyProgram.
  3. The function SetVal() was called from Main() in line number 20.
  4. The exception occurred in line number 26 in the function SetVal()
  5. The runtime exception occurred in the project IndiabixConsoleApplication.
1 only
1 and 2 only
3, 4 and 5 only
All of the above
None of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
1 comments Page 1 of 1.

Dhaval said:   1 decade ago
First line in the error represents runtime exception, other two options are correct as it clear from the error that it is occurred at line 20 and line 26 of the Main program.

Post your comments here:

Your comments will be displayed after verification.