_comboBoxItems array
[0] = "01 01010304"
[0] = "01 01230304"
[0] = "01 01010784"
[0] = "01 01135404"
typedSoFar = "010"
if (_comboBoxItems[i].StartsWith(typedSoFar, StringComparison.CurrentCultureIgnoreCase))
{
match = _comboBoxItems[i];
break;
}
but if is never true. why? 010 is part of 01 01010304 for example. can be problem StringComparison.CurrentCultureIgnoreCase?
It’s never true because none of your elements start with 010. StartsWith() only looks at the substring starting at index 0.
You should use String.Contains() instead.