Click here to Skip to main content
14,699,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All i have two rtf documents and two rich text boxes all i need is i have to compare the rtf documents and load the compared document in one rich text box and the document before comparision to another rich text box. Pls help. Thanks in advance

1 solution

load both documents in two different richtextboxes
and now compare text
TextRange RTBText1 = New TextRange(RichTextBox1.Document.ContentStart, RichTextBox1.Document.ContentEnd)

TextRange RTBText2 = New TextRange(RichTextBox2.Document.ContentStart, RichTextBox2.Document.ContentEnd)

if RTBText1.Equals(RTBText2)
{ Messagebox.Show("Same");}
{ Messagebox.Show("Different");}

Happy Coding!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900