Curtis Koppang [mailto:[EMAIL PROTECTED]] wrote:

> Why would the two be considered different?

Because an exception could occur before the assignement and it would jump to
the finally block.Therefore when it gets to the return statement, there's no
guarentee that author has been assigned. To fix this, add "author = null;"
in your finally block. However, be warned that you are then basically just
swallowing any exceptions and returning null to the caller when you probably
want to raise your own exception.

HTH,
Drew

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to