Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the VB.NET syntax for using List.FindAll() with a lambda?

In C# I have been performing a FindAll in a generic list as follows:

List<group.category> tlist = list.FindAll(p => p.parid == titem.catid);

Two questions, is this the appropriate way of performing such a thing and how do I convert this to VB.Net

like image 955
mattgcon Avatar asked Sep 01 '11 23:09

mattgcon


1 Answers

First, yes this is the appropriate way to do this and secondly:

Dim tlist As List(Of group.category) _
    = list.FindAll(Function(p) p.parid = titem.catid)
like image 110
Andrew Hare Avatar answered Sep 17 '22 14:09

Andrew Hare