且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将数据插入文本文件

更新时间:2023-10-14 14:58:04

如果你不局限于C#中你可以做从Windows命令行:

If you're not limited to c# you can just do the following from a windows command line:

copy one.txt + two.txt three.txt

这将创造你想要的文件,但它会被称为three.txt。如果你必须two.txt拥有它,你可以简单地重命名two.txt别的东西先然后执行副本two.txt作为第三PARM追加。

This would create the file you want, but it would be called three.txt. If you must have it in two.txt, you could simply rename two.txt to something else first and then do the copy append with two.txt as the third parm.