Skip to main content

Google diff, match and patch ported to C#

The title says it all, I've ported the Google diff-match-patch library to C#. It's a nice diff library, and supports Java, JavaScript, Python, C++ (with Qt) and C# with exactly the same API.

Porting wise, everything went fine due to the high test coverage (IIRC, something around 98% of the code is covered by unit tests), so I could quickly check if everything works as expected. For unit testing on C#, I initially used MSTest, but switched to NUnit for portability. The code works fine with Mono 2.4 and .NET 3.5, possibly also with older version. If you change the LINQ extension calls like First () to indexed based access, you'll probably get it working on .NET 2.0 as well. So, have fun with this nice library!

Thanks to Neil Frasier for adding this into the project codebase and for further maintenance.