Home » C# Programming » Exception Handling

Which of the following statements is correct about the C#.NET program given below? using System; namespace CuriousTabConsoleApplication { class MyProgram { static void Main(string[] args) { int index = 6; int val = 44; int[] a = new int[5]; try { a[index] = val ; } catch(IndexOutOfRangeException e) { Console.Write("Index out of bounds "); } Console.Write("Remaining program"); } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!