I like Lambdas a lot, but I do have trouble with this expression:
Dim Test as New List/of String)
Test.add("A")
Test.add("B")
Dim Adress=Test.Indexof(Function (adr) (Trim(Ucase(Adr)) LIke "A")
The compiler warns that Stirng is no delegate and will not compile – any Ideas how to solve this?
List.IndexOftakes aTand returns the index of that object. So you cannot pass a predicate here. I assume you want the first index of a address that equals-ignore-case “A”. Then you can use Linq: