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

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 27514

Trending Articles