As i cant comment yet (not enough experience points), this is an answer for the above
"is there a eqivlant to using in vb.net"
Yes, in .Net 2.0 and above you can use "Using".
In .Net 1.0 and 1.1 however, you would need to dispose if the object in a finall block
Dim fs As System.IO.FileStream = Nothing
Try
'Do stuff
Finally
'Always check to make sure the object isnt nothing (to avoid nullreference exceptions)
If Not fs Is Nothing Then
fs.Close()
fs = Nothing
End If
End Try
Adding the closing of the stream in the finally block ensures that it will get closed no matter what (as opposed to the connection getting opened, a line of code bombing out beneath before the stream is closed, and the stream staying open and locking the file)