I have two classes, one nested in the other.
Public Class Operation
Public Property Name
Public Property Records As List(Of Record)
Public Class Record
Public Property ID as Integer
Now, I have a collection of operations –>
Dim pOperations as List(Of Operation)
Neither “Name” or “ID” are unique between operations and records.
I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.
Tim Scmelter’s suggested code pretty much did the trick. I had to make one small change to make my record IDs unique and it was good-to-go.