Autocomplete TextBox no find other words in string
-
I have this code for autocomplete:
foreach(string match in myList){
if( !string.IsNullOrEmpty(text_box1) ){if( match.StartsWith(text_box1.ToString(),
StringComparison.CurrentCultureIgnoreCase) ){MessageBox.Show(match); }
}
}
In String "The follow me", case find "the", the string is show me. But case find "follow" or "Follow", is not show. I'm tried with Contains but not solved. What can i do ?
-
I have this code for autocomplete:
foreach(string match in myList){
if( !string.IsNullOrEmpty(text_box1) ){if( match.StartsWith(text_box1.ToString(),
StringComparison.CurrentCultureIgnoreCase) ){MessageBox.Show(match); }
}
}
In String "The follow me", case find "the", the string is show me. But case find "follow" or "Follow", is not show. I'm tried with Contains but not solved. What can i do ?
You are using
StartsWith
. If you look for "The follow", you will find the string output. What did you try withContains
?Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial
-
You are using
StartsWith
. If you look for "The follow", you will find the string output. What did you try withContains
?Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial
-
With Contains, when find "follow" is show the complete string. But i try with "the fol" no show more, and "the Follow", example, to not show.
Try using
IndexOf
- http://msdn.microsoft.com/en-us/library/system.string.indexof%28v=vs.110%29.aspx[^].Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial
-
Try using
IndexOf
- http://msdn.microsoft.com/en-us/library/system.string.indexof%28v=vs.110%29.aspx[^].Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial