Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have two c# files file1 and file2 with there are lines of code. I'm going to modify the file2 after modifying i want to Generate report based on what are the differences happened in file 2.
I generated report but my problem is similar lines of file2 appearing only once....


For Eg;

File1 ->KB200, KB400

File2 ->KB600 ,KB600 ,KB400 ,KB200 ,KB700

Report -> KB600 , KB700

I want Report like this KB600 , KB600 , KB700
Posted

1 solution

As I understand it; you want to compare File2 against File1.

A simple strategy: You could walk through each element in File2. For each element; you'll try to find the element in File1. If element is not found; add the element to the Report file. This way you end up with a Report file with all the elements of File2; which are not listed in File1. What about the opposite situation?

:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900