"Smokey Grindel" <no****@nospam.comschrieb:
If I have a function and inside it have something like this
Using Obj1
Using Obj2
Return Value
End Using
End using
The Using statements still know how to handle the dispose and cleanup
correctly dont they?
Yes.
The code equivalent to those the compiler generates for each 'Using' block
basically looks like that:
\\\
Dim Obj As IDisposable
Try
<Contents of the 'Using' block>
Catch
Finally
Obj.Dispose()
End Try
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>