1 2 3 4 5 | Private Function SearchInListboxIndex(lst As ListBox, pstrText As String) As Integer Dim searchFor As String = pstrText Return Array.FindIndex(lst.Items.Cast(Of Object).Select(Function(o) lst.GetItemText(o)).ToArray, Function(s) s Like String.Format("*{0}*", searchFor)) End Function |
沒有留言:
張貼留言