Free/OpenSource .NET Diff generator?

397 Views Asked by At

I'm looking for a free library that can take two strings and produce a diff much like the diff's you see on edit revisions here on SO.

I'm hoping one exists, as this is a trivial part of an app I'm working on and I'd hate to waste time reinventing the wheel.

Any suggestions?

3

There are 3 best solutions below

0
On

I just released my DiffPlex project which does exactly what you ask.

0
On

You can do an MD5 hash of both files to determine if they are identical. The SO-style revision history would be a bit more intensive.

Check out the source code for this diff tool, which might get you going in the right direction.

http://dotnet.jku.at/applications/Diff/Src.aspx

1
On

Surprisingly, i found one implementation which could give you the same functionality as SO edits. codeproject I am going to use it as well and hope this helps other people too.