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

1

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

Pacific answered 1/9, 2011 at 23:18 Comment(0)
C
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)
Cambric answered 1/9, 2011 at 23:20 Comment(1)
Thank you very much. reverting back to VB from C# makes me feel stupidPacific

© 2022 - 2024 — McMap. All rights reserved.