IGrouping<TKey, TElement>

グループ化によって得られたresultは、IGrouping<TKey, TElement>のIEnumerableとなるので、グループごとの要素数を出してみる。

https://learn.microsoft.com/ja-jp/dotnet/api/system.linq.igrouping-2?view=netframework-3.5

MainClass.csで、

とすると、

こうなる。
こうなる。

こうなる。
どれがどれかはわからんが、"Tokyo"と"Osaka"が2つずつで、"Saitama"が1つなので、合ってそう。

Sample/dotnet/IGrouping_TKey_TElement/IGrouping_TKey_TElement/src/IGrouping_TKey_TElement at master · bg1bgst333/Sample · GitHub