In my application, there is a dictionary that stores objects of a custom type representing journal article authors. What I want to do is query this dictionary to extract a list of unique last name-first initial combinations. My query looks like this:
Dim LstNmFrstInits = Authors.Select(Function(kvp) New With {.LName = kvp.Value.AuthorLastName, .FInitial = kvp.Value.AuthorFirstName.First()}).Distinct()
When I attempt to iterate through LstNmFrstInits, the application throws an InvalidOperationException. I believe the problem happens when I call the First() method on the first name. I do not want to retrieve the entire first name; I only want the first initial.