📜  使用 C# 代码示例编写文本文件

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

代码示例1
// Create a file to write to.
string createText = "Hello and Welcome" + Environment.NewLine;
File.WriteAllText(path, createText);

...

// Open the file to read from.
string readText = File.ReadAllText(path);