开发者

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

开发者 https://www.devze.com 2023-04-02 02:08 出处:网络
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);

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


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号