On Fri, 07 Mar 2008 11:19:34 -0800, parez <ps*****@gmail.comwrote:
Whats the best way of handing exception of using?
There's no practical difference between the two options that you posted,
other than the presence of the "finally" block. You'd use "finally" for
the same reasons you'd use it otherwise: you have something that always
has to be done before exiting the try/catch/finally section, whether an
exception occurs or not.
Obviously, if the only reason you would have had a "finally" block before
is to dispose the "something" you've put in the "using" statement, then
you wouldn't need "finally". But otherwise, nothing has changed.
And next time, please indent any code you post. Thanks.
Pete