It is relatively simple if you use LinQ. If you have a List of Person objects and you wish to find the people with the phrase 'an' in their name you would do something like this
class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
List<Person> SelectItems(List<Person> people, string searchText)
{
return (from person in people where person.Name.Contains(searchText) select person).ToList();
}
If you are trying to get the results from a database, then you need to use a LIKE clause in the query like this
SqlCommand cmd = new SqlCommand("SELECT Name, Age FROM People WHERE Name LIKE @SearchString", con);
cmd.Parameters.AddWithValue("@SearchString", "%" + searchString + "%");
Hope this helps
Oops, just saw your question was about VB, but you should get the picture.
Code conversion
Convert C# to VB.NET[
^]