how to find plain text from rtf file programmatically using C#

If you want to find plain text from rtf file programmatically, you can use RichTextBox control to remove RTF formatting and convert it to plain text without embedding RichTextBox control on windows form.

Before try this code add reference to System.Windows.Forms.

string Rtfpath = @"C:\test.rtf";
System.Windows.Forms.RichTextBox rtfBox = new System.Windows.Forms.RichTextBox();
string str;
str = System.IO.File.ReadAllText(Rtfpath);
rtfBox.Rtf = str;
string GetplainText = rtfBox.Text;

first we create the RichTextBox control object and then we get contents of the rtf file in rtf formatting with the help of System.IO.File.ReadAllText(FilePath) method. After that we set this text(UTF-16) to RichTextBox.Rtf property and than you can get plain text with the help of RichTextBox.Text property.