private void ButtonCheck_Click(object sender, EventArgs e)
{
string s = richTextBox1.Text;
int i = 0;
if (s.Contains("FREE") == true || s.Contains("Free") == true)
{
i = i + 1;
}
if (s.Contains("GET") == true || s.Contains("Get") == true)
{
i = i + 1;
}
if (s.Contains("http://") == true)
{
i = i + 1;
if (i > 0)
{
MessageBox.Show("Its a SPAM \n Spam Words Detected is " + i + ".", "SMS SPAM DETECTION TOOL | KEYWORD", MessageBoxButtons.OK);
}
else
{
MessageBox.Show("Its not a SPAM", "SMS SPAM DETECTION TOOL | KEYWOORD", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
Question:
How to underline every keyword in richtextbox when s.Contain == True..