0
  listBox1.Items.Clear();
        var dmp = new diff_match_patch();
        var diffs = dmp.diff_main(richTextBox1.Text, richTextBox2.Text, true);

        foreach (var i in diffs)
        {
            listBox1.Items.Add(i);
            ;               
        }

I got this working, it compares two strings and writes out insertions, deletions etc., but it's not really readable. I would like to get something like that:

Could you please help me with, or at least how to begin with this one?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
gyaka
  • 9
  • 2
  • Is your question asking us to implement a diff tool for you? – Rob May 01 '16 at 12:49
  • Hell no, but have no idea how to begin with it, I see that this page is absolutely against beginners... – gyaka May 01 '16 at 12:50
  • 1
    It's absolutely not against beginners. The problem is your question really doesn't have an answer. You're telling us you don't like the google diffs library, and show us a picture of what you want it to look like. So, there are two choices: Search for a library that looks nice to you, or implement it yourself. If you decide to implement it yourself, you can come to SO to ask for a solution to a particular problem, not something broad as this. There are plenty of ways to start. Try write an algorithm which simply detects changes without formatting, for example. – Rob May 01 '16 at 12:53
  • Instead of showing the diff on form I would suggest you to display the diff. in browser. – Manoj Naik May 01 '16 at 13:26

0 Answers0