开发者

How to check if a List A is a sub-list in List B using VB.net?

Do I have to write my own Function ?

Is there a built in Function 开发者_高级运维in List to checks another list for membership ?


Dim ListA As New List(Of Int32)(New Int32() {1, 3, 5})
Dim ListB As New List(Of Int32)(New Int32() {1, 2, 4, 6, 5, 3, 7})
Dim isSubList = Not ListA.Except(ListB).Any() 'True'

MSDN: Enumerable.Except

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜