Home / C# Programming / Exception Handling :: Discussion

Discussion :: Exception Handling

  1. 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 FreshergateConsoleApplication.MyProgram.SetVal(Int32 index, Int32 val) in D:\Sample\FreshergateConsoleApplication\MyProgram.cs:line 26 at FreshergateConsoleApplication.MyProgram.Main(String[] args) in D:\Sample\FreshergateConsoleApplication\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 FreshergateConsoleApplication.

     

  2. A.

    1 only

    B.

    1 and 2 only

    C.

    3, 4 and 5 only

    D.

    All of the above

    E.

    None of the above

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment