开发者

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


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜