Pergunta

I'm working with text files. Actually one file, where I have to copy information to it. I'm using streamReader and streamWriter. But I'm having an error whenver I close the file and try to open it again. I can't open it again to start writing from where I stopped, and if I use the same IO writer in any other sub method, I get a run-time error message saying that file is being used. Is there any way that I can close and open the text file separately at anytime?

Dim ioFile As New StreamWriter(filename, False)
'code
iofile.close() 

There is no problem in how many times I read or Write in between , but whenever I close it, can't open it.

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top