Reading From a Text File in C#

前端 未结 8 1647
轮回少年
轮回少年 2020-11-30 09:44

I have the following program that will send (output) information to a text file, but now I want to read (input) from the text file. Any suggestions would be greatly appreci

8条回答
  •  一生所求
    2020-11-30 10:12

    It's just one line of code:

    string content = System.IO.File.ReadAllText(@"C:\textfile.txt");
    

提交回复
热议问题