DataHelperGetValuesFrequencyTDataContainer Method (IEnumerableTDataContainer, FuncTDataContainer, Object) |
Gets frequency of values in data collection.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 9.0.0
Syntax 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,
Int32Pairs of (value, occurrences count) in
dataCollection.
See Also