News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

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