Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

List(Of T).FindIndex: How to handover an argument in the Predicate(T)

$
0
0
Hi,
I'm using a List(of T) and need to geht the Index of one of the elements.
The Search Predicate as shown on MSDN should look like that:
Code:

Private Function FindID(ByVal bk As Book) As Boolean
        If bk.ID = IDToFind Then
            Return True
        Else
            Return False
        End If
    End Function

Isn't it possible to handover the IDToFind as a parameter like:
Code:

Private Function FindID(ByVal bk As Book, ByVal IDToFind as Integer) As Boolean

Viewing all articles
Browse latest Browse all 27189

Trending Articles