Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

using vs finally

$
0
0
Hi,

I was wondering, which technique is a "better" way manage resources.

In my case, a data connection and a data reader.

I uses a nested "using" statement in a try/catch block rather than explicitly closing the reader and connection in a "finally' statement.

Which would you use and why?

Thanks,

Bob H

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>