reply |
| alice johnson replied to sudhakar subramaniyan at 05-Jul-08 01:17 |
You can have a try within a try also like this, but always remember one thing that
in the catch(Exception ex) should be the last catch method.
Because it catches all the different types of exceptions., example DivideByZeroException only catches this type of exception.
Hope 'm clear.
try
{
try
{
}
}
catch(SqlException ex)
{
MessageBox.Show(ex.Message);
}
catch(IOException ex)
{
MessageBox.Show(ex.Message);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
} |
|