Click or drag to resize
DataHelperGetValuesFrequencyTDataContainer Method (IEnumerableTDataContainer, FuncTDataContainer, Object)
Gets frequency of values in data collection.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 11.0.0
Syntax
C#
public static Dictionary<Object, int> GetValuesFrequency<TDataContainer>(
	IEnumerable<TDataContainer> dataCollection,
	Func<TDataContainer, Object> valueSelector
)

Parameters

dataCollection
Type: System.Collections.GenericIEnumerableTDataContainer
Enumerable collection of data.
valueSelector
Type: SystemFuncTDataContainer, Object
Function selecting item (value) within TDataContainer.

Type Parameters

TDataContainer
Data container (e.g. DataRow, AbstractInfo).

Return Value

Type: DictionaryObject, Int32
Pairs of (value, occurrences count) in dataCollection.
See Also