Answer: In the code example below, the function “FindData” will return list(“sublist”) of the objects having matchingKey same as viewstate value.
Dim sublist As List(Of MyClass)
sublist = allClient.FindAll(AddressOf FindData) ‘sublist will contain objects matching specified matching condition
Function FindData(ByVal b As MyClass) _
As Boolean
If (b.matchingKey = CInt(ViewState("matchingKey "))) Then ‘matching condition
Return True
Else
Return False
End If
End Function
Asked In: Many Interviews |
Alert Moderator