📜  c# 读取文件流 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:58.605000             🧑  作者: Mango

代码示例2
//this will get a string with all the text from the file
var fileText = File.ReadAllText(@"path\to\my\file.txt");

//this will get all of the lines of the file as an string[]
var fileLines = File.ReadAllLines(@"path\to\my\file.txt");