13

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

Steve Guidi
  • 19,700
  • 9
  • 74
  • 90
mattgcon
  • 4,768
  • 19
  • 69
  • 117

1 Answers1

21

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)
Andrew Hare
  • 344,730
  • 71
  • 640
  • 635