using System;
class Program
{
public static void Main(String[] args)
{
int[] a = new int[4];
for (int i = 0; i < 10; i++)
{
try
{
a[i] = i;
Console.WriteLine(a[i]);
}
catch (IndexOutOfRangeException)
{
Console.WriteLine("Array Index out of Bounds");
}
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment