How to compare two rich text box contents and highlight the characters that are changed?
问题 Code that I used for reading the 2 richtextbox contents are as follows: richTextBox1.Text = File.ReadAllText(tfsVersionFilePath); richTextBox2.Text = File.ReadAllText(dbVersionFilePath); Now, I need to compare the two rich text box contents and highlight the characters that are changed in both richtextboxes. Purpose is to get the difference and highlight the characters as in TFS (comparing files) through c# application. Thanks. Edit: int length = (richTextBox1.Text.Length > richTextBox2.Text