C# - 比较两个CSV文件,并进行输出

C# - 比较两个CSV文件,并进行输出

问题描述:

需要一点帮助,我有两个信息来源和信息是由不同的节目导出到两个不同的CSV文件的。他们都应该包含相同的信息,但是这是需要检查什么

Need a bit of help, I have two sources of information and the information is exported to two different CSV file's by different programs. They are supposed to include the same information, however this is what needs to be checked.

因此​​,我希望做的是如下:

Therefore what I would like to do is as follows:


  • 乘坐从两个文件中的信息。

  • 比较

  • 输出任何差异和文件的区别是,(如文件一个包含这一点,但文件b没有反之亦然)。

中的文件200,000奇数行,以便将需要尽可能有效。

The files are 200,000 odd rows so will need to be as effective as possible.

试图与Excel的但已被证明是过于复杂,我真的在努力寻找编程的方式这样做。

Tried doing this with Excel however has proved to be too complicated and I'm really struggling to find a way programatically.

根据您的回答你的问题的意见,如果它不真的需要用代码实现,你可以做的不如下载一个比较工具,这是可能更复杂。

Depending on your answers to the comments on your question, if it doesn't really need to be done with code, you could do worse than download a compare tool, which is likely to more sophisticated.

的WinMerge 为例)