Hi.
I was wondering if anybody could explain to me the purpose of the Finally block in exception handling. For example, what is the difference between these two pieces of code.
Example 1:
try
{
// open a file
}
catch (IOException ioe)
{
// log the error or something
}
finally
{
// do more stuff
}
Example 2:
try
{
// open a file
}
catch (IOException ioe)
{
// log the error or something
}
// do more stuff
Thanks,
Dave