26

Are there any open source algorithms in c# that solve the problem of creating a difference between two text files?

It would be super cool if it had some way of highlighting what exact areas where changed in the text document also.

S.L. Barth
  • 8,058
  • 71
  • 49
  • 63
public static
  • 12,294
  • 26
  • 63
  • 84

5 Answers5

16

There's also a c# port of Google's (Neil Fraser) diff, match and patch.

Goran
  • 6,732
  • 9
  • 40
  • 57
12

There is Menees Diff which will provide you with a C# diff implementation. The source code is included. I've used it in the past with good success wrapping it in my own implemenation.

cfeduke
  • 22,750
  • 10
  • 60
  • 65
9

How about this one? : DIFFPLEX

Tedd Hansen
  • 11,595
  • 14
  • 59
  • 96
Robert Swift
  • 91
  • 1
  • 1
7

Check out diff. Here it is in the gnu project (open source, of course), and many more links to implementations are found in the wikipedia article. A comparison of different such programs is found here.

eladv
  • 2,001
  • 1
  • 12
  • 3
6

check this link "good line by line Diff Algorithm " http://www.codeproject.com/KB/recipes/diffengine.aspx

Tarek Mohamed
  • 61
  • 1
  • 2