How to write a text file in C#

前端 未结 4 626
抹茶落季
抹茶落季 2020-12-07 02:48

I need to write a strings into a text file from C#, each string on a new line...How can I do this?

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-07 03:29

    How about StreamWriter class? Read more here...

    And do not forget about exception handling e.g missing file permissions etc.

提交回复
热议问题