C
C
CliverQwerty2018-06-05 06:46:04
C++ / C#
CliverQwerty, 2018-06-05 06:46:04

Spell checking C# windows forms, help?

from a text file (dictionary) check words with richTextBox and underline in red if there is no similarity ..
my attempts, but it does not work

StreamReader sr = new StreamReader(@"C:\проект\pldb-win.txt");
            String line = sr.ReadToEnd();
            for (int i = 0; i < line.Length; i++)
            {
                int index = richTextBox1.Text.IndexOf(line);
                richTextBox1.Select(index, line.Length);
                richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont, FontStyle.Underline);
                richTextBox1.SelectionColor = Color.Red;
            }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question