private GetFirstIndexOf ( String search, Int32 startindex ) : Int32 | ||
search | String | The string for which to search for. |
startindex | Int32 | /// The index from which to start searching. Enter '0' to search all items. /// |
return | Int32 |
private Int32 GetFirstIndexOf(String search, Int32 startindex) {
Int32 i = startindex;
while (true) {
if (i >= Items.Count)
return -1;
else if (Items[i].DisplayName.ToUpperInvariant().StartsWith(search.ToUpperInvariant()))
return i;
else
i++;
}
}