Code:private void SearchText(string searchText) // search phrase or text in txtcontent of notepad { for (int i = 0; i < txtContent.TextLength; i++) { for (int j = 0; j < searchText.Length; j++) { if (txtContent[i] == searchText[j]) // why i cann't access txtcontent index? txtContent.Select(_startIndex, searchText.Length); } } }