Click or drag to resize
DataHelper.GetValuesFrequency<TDataContainer> Method (IEnumerable<TDataContainer>, Func<TDataContainer, Object>)
Gets frequency of values in data collection.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax
C#
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