I'm trying to write to a file using the StreamWriter.
Dim write as IO.StreamWriter
write = new io.streamwriter(file)
write.write(txtEncryption.text)
write.close
I stopped the code in debug mode and i saw it crashes and goes straight to the exception when reaches line 2.
It is because i just made the file and it's still in use ? How can i avoid that ?
Assumption (if file was not opened anywhere else) : You open already opened one.Make sure that all your opened streams closed properly. You can use this syntax too