سلام لطفا اساتید نگاه کنن این کد تونستم رنگو در بیارم ولی تو خروجی تکست باکس نتونستم نمایش بدم یه راهنمایی کنید یه چک هم کنید اصول درسته ممنون
private void button1_Click(object sender, EventArgs e)
{
string word = "khobi ";
int s_start = richTextBox1.SelectionStart, startIndex = 1, index;
while ((index = richTextBox1.Text.IndexOf(word, startIndex)) != -1)
{
richTextBox1.Select(index + word.Length, 18);
richTextBox1.SelectionBackColor = Color.Yellow;
startIndex = index + word.Length;
}
تکست داخل ریچ تکست هم اینجور نوشتم salam khobi chetori che khabar chikara mikoni