Search items in a list

Hi All

I have a string list, which internal element are lists too, {(A1,B1),(A2,B2)}

How can i know if (A3,B3) is in this list or not?

i have used list.contains({A3,B3}) BUT it didnt work, is this a correct expression?

Or I am thinking Array.IndexOf(listName, {(A3,B3)}) > -1
But my list is a system.collection.list.string

Help! Thanks!

Did not test, but try SequenceEqual

myArrList.Any(Function(arr) arr.SequenceEqual(myArr))


thanks for your reply!
I got this error

my list is list(of string()), and the cannot be converted to IEnumberable(of string)

Any idea how to deal with this?

Is “Fund_Data_List” is your list of Array’s? If so error is because you are comparing array to the list.

myArrList.Any(Function(arr) arr.SequenceEqual({“a”,“b”}))


genius it works!!! love you!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.