'How to use .Where in generic list

I have a List(Of MyType) and I would like to use LINQ to get a subset of the list.

On MyType there's a field called AccountNumber. Can I use LINQ to say soemthing like this?

Dim t As List(Of MyType)
t = GetMyTypes()
t = t.Where(AccountNumber = "123")

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source