I have a collection as follows
Private _bankRates As Dictionary(Of RateSourceBank.Key, RateSourceBank)
Where RateSourceBank.Key is simply
Public Class Key
Public RateType As String
Public EffectiveDate As DateTime
End Class
How can I retrieve a subset of _bankRates that have more than one EffectiveDate per RateType?
Unfortunately all similar examples I find are in C# and I fond the LINQ translation somewhat less than straightforward, especially when it comes to the group by syntax, e.g. with query below
Dim ratesWithDuplicates = From rates In _bankRates
Group rates By rates.Key.RateType
Into grp()
Where grp.Count > 1
I receive error:
Definition of method 'grp' is not accessible in this context