tags:

views:

128

answers:

1

I need to compare two strings and output the diff in HTML (similar to MS Word "track changes"). Language is C#, this is (not surprisingly) a .NET web app. There are a few similar questions (like this one for PHP/Python), but no existing question on SO.

I don't need a finished project, just anything that will cut out the extra work. I know this problem has been solved at least once. I'm looking to leverage from that starting place (source for an object, just a method, just an algorithm in C#, anything will be useful). Output for the diff needs to be in HTML.

+3  A: 

There is a C# class available from here (under a BSD licence) that will diff two textual inputs. If you download the source code, there is also some code that will turn this output into HTML. An example of its output can be found here.

adrianbanks