News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Exception Handling

Started by sukishan, Sep 04, 2009, 03:55 PM

Previous topic - Next topic

sukishan

Exception Handling
Exception handling has always been supported in the Java programming language, and that capability is easily reused with the .NET exception model as well.

package hks;
import System.*;
public class UseExceptions
{
  public static void main()
  {
    try
    {
    int a = 10;
    int b = 10;
    int c = a/(a-b);
    }
    catch (System.Exception ex)
    {
    Console.WriteLine("Exception Caught");
    Console.WriteLine(ex.get_Message());
   }
  }
}
A good beginning makes a good ending

pradeep prem

this expection handling program easily known

and it very small program to use