c# 4.0 - Can we compare two JavaScript files using C#? -


I have tried to compare two text files if there is only one data but there is a difference of one place So the result is 'different'.

Can anyone tell me how to compare two javascript files using C #?

but white space regex -replace is:

  Regex _r = New Regex (@ "\ s +", RegexOptions.Compiled); Install string result = _r. (Value, "");  

Run it on both files and compare the results; It changes a sequence of standard white letters (space, tabs, carriage returns, vertical tabs etc.) with single space. You can then compare it with equal (whether case sensitive or not, as you need it).

Of course, the white space is important inside the string, so it assumes that string handling does not rely on white space in all comparative files.

Though two very different code files can have the same effect, so if you have difficult work, then what can you do after that.


Comments