Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Gestion d’exception ‘IndexOutOfRangeException’

ArrayList, Array, HashTable, BitArray
{filelink=18434}

using System;
 
class ExException
{
    public static void Main()
    {
        try
        {
            int [] tableauTest = new int [10];
            tableauTest[10] = 123; // Exception
        }
        catch(IndexOutOfRangeException err)
        {
            Console.WriteLine("Erreur: "+err);
        }
    }
}

No comments yet.

Leave a Comment