https://code-corner.dev/2023/11/08/NET-8-%E2%80%94-FrozenDictionary-performance
return LinqHelper.GroupUniqueLabelsById(allItems, x => x.InspectionId, x => x.Grower).ToFrozenDictionary(); // or HashSet var allFields = GetDataFields(); var fieldNames = allFields.Select(x => x.FieldName).ToFrozenSet();
951500cookie-checkC# FrozenDictionary