Cannot write to file after reading

后端 未结 5 876
悲哀的现实
悲哀的现实 2020-12-04 02:33

In the following code I get the error \"stream was not writable\":

class Class1
{
    private static void Main()
    {
        FileStream fs = new F         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 03:00

    Do not close the StreamReader. Just comment the line below and it will work.

     r.Close();
    

提交回复
热议问题