I have a private class variable that holds a collection of order items:
Private _Items As New System.Collections.Generic.SortedList(Of Integer, OrderItem)
What I'm trying to do it Get and Set a subset of the items through a Property on the class using the .Where() extension method of IEnumerable (I think). Something along the lines of:
Public Property StandardItems() As SortedList(Of Integer, OrderItem)
Get
Return _Items.Where(Function(ItemID As Integer, Item As OrderItem) Item.ItemType = "SomeValue")
End Get
Set(ByVal value As SortedList(Of Integer, OrderItem))
_Items = value
End Set
End Property
Is this possible? If so, how would I implement it? I'm not having much luck with MSDN docs, Visual Studio intellisense or trial and error.