Click here to Skip to main content
15,991,071 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
Can anyone tell me how to compare two javascript files using C#?
I have tried comparing the two text files,But if the first file and second file has same data only a space is extra in Second file.then it showing me a Change.
Posted
Updated 27-Sep-10 3:07am
v2
Comments
Hiren solanki 27-Sep-10 9:08am    
Edited for grammer.

1 solution

So read both files into separate strings, remove all of the spaces, tabs, and any other unprintable ascii character, and THEN compare the strings.
 
Share this answer
 
Comments
Hiren solanki 27-Sep-10 9:08am    
Yeah, That is the way John.
hemantwithu 27-Sep-10 9:09am    
Can we find the exact change in the two files?
hemantwithu 27-Sep-10 9:10am    
I mean where the change is

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