DataHelper.GetValuesFrequency<TDataContainer> Method (IEnumerable<TDataContainer>, Func<TDataContainer, Object>) |
Gets frequency of values in data collection.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax public static Dictionary<Object, int> GetValuesFrequency<TDataContainer>(
IEnumerable<TDataContainer> dataCollection,
Func<TDataContainer, Object> valueSelector
)
Parameters
- dataCollection
- Type: System.Collections.Generic.IEnumerable<TDataContainer>
Enumerable collection of data. - valueSelector
- Type: System.Func<TDataContainer, Object>
Function selecting item (value) within TDataContainer.
Type Parameters
- TDataContainer
- Data container (e.g. DataRow, AbstractInfo).
Return Value
Type:
Dictionary<Object,
Int32>Pairs of (value, occurrences count) in
dataCollection.
See Also