Tuesday, 23 June 2009






















using System;
public class EHclass
{
public static void Main()
{
try
{
Console.WriteLine("executing the try statement");
throw new NullReferenceException();
}
catch(NullReferenceException e)

{
Console.WriteLine("{0}caught exception #1",e);
}
catch
{
Console.WriteLine("caught exception #2");
}
finally
{
Console.WriteLine("executing the finally block");
}
}
}


No comments:

Post a Comment