且构网

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

合并文本文件

更新时间:2023-02-20 11:35:15

我建​​议尝试此列表中的第二个:

http://***.com/questions/6311358/ficient-way-to-组合多个文本文件 [ ^ ]
http://www.c-sharpcorner.com/uploadfile/sonuraj /merge-two-files-with-C-Sharp/ [ http://social.msdn.microsoft.com/Forums/eu/csharpgeneral/thread/0faebd8f-339b-4f74-96e0-d4a71634ade0 [
I would recommend trying the the second one in this list:

http://***.com/questions/6311358/efficient-way-to-combine-multiple-text-files[^]
http://www.c-sharpcorner.com/uploadfile/sonuraj/merge-two-files-with-C-Sharp/[^]
http://social.msdn.microsoft.com/Forums/eu/csharpgeneral/thread/0faebd8f-339b-4f74-96e0-d4a71634ade0[^]

Your code assumes that the files are text files, which may be OK, but is not necessarily true. Of course could have problems with using bytes in that you have text files, but they are different encodings.


您也可以使用字符串来实现.如果您使用的是文件,则只需将两者连接即可.
You can achieve this using strings also. If you are using file then just concatenate both to join.