News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

Exceptions -C# .Net

Started by sukishan, Jul 11, 2009, 03:00 PM

Previous topic - Next topic

sukishan

C# .Net Tutorial Exceptions 

This article is a basic c# tutorial dealing with exceptions in c# .net.

   Practically any program including c# .net can have some amount of errors. They can be broadly classified as compile-time errors and runtime errors. Compile-time errors are errors that can be found during compilation process of source code. Most of them are syntax errors. Runtime errors happen when program is running.

   It is very difficult to find and debug the run-time errors. These errors also called exceptions. Rules of good coding style say that program must be able to handle any runtime error. Exception generates an exception call at runtime. Exceptions in C# can be called using two methods:

1. Using the throw operator. It call the manage code anyway and process an exception.
2. If using the operators goes awry, it can generate an exception.
A good beginning makes a good ending