What is the difference between File.ReadAllLines() and File.ReadAllText()?

后端 未结 3 698
谎友^
谎友^ 2020-12-05 06:16

What is the difference between File.ReadAllLines() and File.ReadAllText()?

3条回答
  •  抹茶落季
    2020-12-05 06:32

    ReadAllLines returns an array of strings. Each string contains a single line of the file.

    ReadAllText returns a single string containing all the lines of the file.

提交回复
热议问题