Classic example is closing a database connection
no matter whether the SQL operation was successful or generated an exception.
In such a case, you can use the optional finally block
try
{
// Open a database connection
// Execute SQL statement
}
catch (DbException ex)
{
// Handle database exception
}
finally
{
// Close database connection if it exists
}
tnk u sir tnks for joining with u
ReplyDeleteDot Net Training institutes in Chennai