Part string matching in arraylists in VB.net

  • Thread starter Thread starter Paul [Paradise Solutions]
  • Start date Start date
P

Paul [Paradise Solutions]

Hi all

I'm not sure if this is possible, so any input would be good.
I have an arraylist and would like search its elements, but my search
string wil only be ~part~ of the element value.

eg.
Element value="Test Element Value"

Search string = "Test"

Is there an existing method that I can use (and have not yet found) or
do I need to write my own routine?


Many thanks

Paul
 
I think your are looking for the LIKE keyword. I am not sure if it is in C#,
but in VB.NET it works great:

Dim el as String = "Test Element Value"
Dim search as String = "*Test*"

if el like search then
' Test exists inside el
End if

Roberto
 
Back
Top