Resume previous index during a search
Hi,
am trying to resume previous index during a search for matches from a file from the code below, incase an application loses Internet Connection. How do you achieve this in .NET?
Code:
Wordintext = Wordrepcemnts.Keys.ElementAt(WordintextIndex)
foundWordintextIndex = RichTextBox1.Find(Wordintext, 0, RichTextBox1.Text.Length, RichTextBoxFinds.WholeWord)
If foundWordintextIndex > -1 Then
For Each Wordforrep In Wordrepcemnts(Wordintext)
'do something here
Next
Re: Resume previous index during a search
Find returns the index. Then you can use an overload of Find that includes the starting index.
But since you have the text in a RTB, how losing internet connection affect it?